Maintain the invaraint : i + j = k -1 if B[j-1] < A[i] < B[j], then A[i] must be the kth smallest else if A[i-1] < B[j] < A[i], then B[j] must be the kth smallest
If the above conditions are not satisfied, subdivide the arrays. On Thu, Jun 13, 2013 at 1:41 PM, sourabh jain <[email protected]> wrote: > its same as finding a median of two sorted arrays only. > http://www.geeksforgeeks.org/median-of-two-sorted-arrays/ > > > On Sun, Jun 9, 2013 at 4:49 PM, rahul sharma <[email protected]>wrote: > >> Please suggest logm+logn aproach... >> can be easily done in o(k) >> >> >> How to do in logm +logn >> >> plz suggest algo >> >> -- >> You received this message because you are subscribed to the Google Groups >> "Algorithm Geeks" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to [email protected]. >> >> >> > > > > -- > Regards, > Sourabh Kumar Jain > +91-8971547841 > > -- > You received this message because you are subscribed to the Google Groups > "Algorithm Geeks" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > > > -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
