@Anand , thanx for info , but does the question asked requires so much ? I felt , you have two sorted sub arrays so simply merging it (of merge sort fame ! ) would solve it , isn't it ?
On Jul 3, 9:24 am, ankur bhardwaj <ankibha...@gmail.com> wrote: > @anand: this code will not work when n is not power of 2. > > check for this example: > > {2, 4, 55, 25, 15} > > Output was: > > 0 4 > 0 2 > 1 3 > 0 1 > 2 3 > 2 4 25 55 15 0 0 0 > ascending order -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this group, send email to algoge...@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.