Natural Merge Sort

8,952
0
Published 2020-05-18
This is my favourite sorting algorithm, which is similar to a bottom-up merge sort, but it also exploits any naturally occurring sorted sequences. So it's basically like a merge sort that's gonna perform a lot better on a list with lots of partially sorted sequences.

Best case is O(n) if the list is sorted
Average case is O(n log n)
Wort case is O(n log n)

————— Update 29/12/2020 —————
• Now the project shows the actual algorithm visually!