3 ms·
At which point does this article talk about Merge Sort? Anyway... Merge sort doesn't even need to be recursive in the first place. It's always taught that way
by Dwedit 2y ago
At which point does this article talk about Merge Sort?
Anyway... Merge sort doesn't even need to be recursive in the first place. It's always taught that way in CS classes, but it can just as easily be written with nested for loops. On the outermost for loop, you double the sublist size until you exceed the whole size.
- bediger4000 2y agoWikipedia gives an example merge sort that does nearly exactly what you describe. That algorithm has some weird performance drops at 2^n+1 sorted elements. https://bruceediger.com/posts/mergesort-investigation-8/ https://bruceediger.com/posts/mergesort-investigation-8/
- deleted 2y ago[deleted]