3 ms·
Haskell's standard library sort, a variant of merge sort, also makes use of runs. It runs in O(n log (number of runs)). It's quite a lot simpler than Timsort.
by eru 6y ago
Haskell's standard library sort, a variant of merge sort, also makes use of runs.
It runs in O(n log (number of runs)). It's quite a lot simpler than Timsort.