Thanks everyone, Achieving nlogn, interative, and in-place separately is easy. But I did not know of algo that achieves all these simultaneously for merge sort. Thanks DK for pointing to that paper I wonder if algorithm presented in paper is also stable.
--Nitin On Sun, Aug 7, 2011 at 5:10 PM, immanuel kingston < kingston.imman...@gmail.com> wrote: > @DK and Amit, thanks for correcting my understanding. > > > > On Sun, Aug 7, 2011 at 3:51 PM, amit karmakar > <amit.codenam...@gmail.com>wrote: > >> @DK >> Hmm, i do understand what you said. Maybe, i should make it clear that >> i just wanted to tell that implementing a non-recursive merge-sort >> will not require explicit stacks and is actually easier to implement. >> This was because someone mentioned using stacks to remove recursion. I >> didn't mean to tell anything more than that. :) >> >> On Aug 7, 3:07 pm, DK <divyekap...@gmail.com> wrote: >> > @Amit and @Immanuel: You're not getting the point. Merge sort is not >> > in-place because it requires an extra O(N) array during the merge step. >> > The problem asks not to remove the recursive nature of the merge-sort >> but to >> > remove the non-in-place nature of merge sort by removing the need for >> that >> > extra array. This is a research problem that has been solved and there >> have >> > been multiple papers on the topic. I've posted the earliest one that >> forms >> > the basis of this field. >> > >> > -- >> > DK >> > >> > >> http://gplus.to/divyekapoorhttp://twitter.com/divyekapoorhttp://www.divye.in >> >> -- >> 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. >> >> > -- > 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. > -- 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.