Why make this overcomplicated? There isn't a merge sort needed if two arrays were already sorted.
It takes only O(n). Each time, you compare the leading elements and remove the smaller one and store it in a new array. On Apr 12, 6:33 pm, Carl Barton <[email protected]> wrote: > Very interesting link! > > As we only need to perform one merge we should be able to modify it to run > in O(n) time? > In a similar style as a strand sort? > > On 12 April 2011 22:55, hary rathor <[email protected]> wrote: > > > > > > > > > > >http://thomas.baudel.name/Visualisation/VisuTri/inplacestablesort.html > > > take a glance on this merge sort this is Inplace and also stable > > > -- > > 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.
