That's linear space, not constant space. Vaibhav's seems good for constant space solution
On 12 April 2011 13:17, sravanreddy001 <[email protected]> wrote: > Yes.. merge sort. > > O(n) to find the starting of 2nd sub-array. > and O(n) for the merge process (similar to last step in merge sort) > > O(n) > > On Apr 12, 2:37 pm, Akash Agrawal <[email protected]> wrote: > > Given an array with two subparts sorted. How will you make a final sorted > > array. > > > > i/p: 1, 5, 7, 9, 11, 23, 2, 3, 8, 9, 21 > > > > o/p: > > 1, 2, 3, 5, 7, 8, 9, 9, 11, 21, 23 > > > > Regards, > > Akash Agrawalhttp://tech-queries.blogspot.com/ > > -- > You received this message because you are subscribed to the Google Groups > "Algorithm Geeks" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]. > For more options, visit this group at > http://groups.google.com/group/algogeeks?hl=en. > > -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en.
