by prmichaelsen · 10y ago · 0 comments
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
Once again, thanks for reading!
No comments yet.