So, "such that k < m*n" - that means that k may be out bounds of m or n? If both arrays are sorted, the last of the two would be the largest sum. The kth sum would be the last - k, as long as 0 < k <= m and 0 < k <= n
On Fri, Apr 1, 2011 at 2:07 AM, Rajeev Kumar <rajeevprasa...@gmail.com> wrote: > Two sorted arrays A and B have been given.such that size of A is m and size > of B is n > You need to find the k th largest sum (a+b) where a is taken from A and b is > taken from B. such that k < m*n > > > -- > Thank You > Rajeev Kumar > > -- > You received this message because you are subscribed to the Google Groups > "Algorithm Geeks" group. > To post to this group, send email to algogeeks@googlegroups.com. > To unsubscribe from this group, send email to > algogeeks+unsubscr...@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/algogeeks?hl=en. > -- Cheers, hammett http://hammett.castleproject.org/ -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en.