3 ms·
Interesting, I had never heard of External Merge Sort before. You are correct in that it does not work on unsigned ints and is unnecessarily slow. An interesti
by prmichaelsen 10y ago
Interesting, I had never heard of External Merge Sort before. You are correct in that it does not work on unsigned ints and is unnecessarily slow.
An interesting alternative came to my attention in the form of "gnome sort". Gnome sort is also affectionately know as "stupid sort". It behaves similarly to bubble sort. Bubble sort "sinks" large elements which allows small elements to "bubble" up. Gnome sort, however, sinks large elements towards the end of the array AND sinks small elements towards the front of the array.
More on gnome sort:
https://en.wikipedia.org/wiki/Gnome_sort https://en.wikipedia.org/wiki/Gnome_sort
Once again, thanks for reading!