@dumanshu > ok ! i got a O(n lgn) finally > i don know exact complexity > Let N = size of first array > Find the first N smallest elements using one pointer in each array > now swap the list of elements from index 0 to second-pointer in > second array to first array > with first_poiner+1 to N in first Array > now,after swapnig we need to sort both array
so complexity= n + n log n+ m log m (n is the size of of first array and m is the size of second array) . . . O(n) = (n log n ) or (m log m) thanks Durgesh -- 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.