Hi all, Given 2 sorted arrays: A and B each holding n and m elements respectively,. Hence, total no. of elements = m+n Give an algorithm to place the smallest 'm' elements(out of the m+n total available) in A and the largest 'n' elements in B. ( A and B need not be sorted in the end)
eg: A : 1 2 3 B: 0 1.5 4 5 9 Output: A can contain any combination of nos 0,1,1.5 and B should contain 2 3 4 5 9 (in any order.) Constraints: No extra space. Linear Time preferred -- 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.