3 ms·
As much as I love Slowsort, it is an inefficient mergesort, so you could argue that it does indeed waste time on a sub-routine. On the other hand, the tree numb
by quchen 10y ago
As much as I love Slowsort, it is an inefficient mergesort, so you could argue that it does indeed waste time on a sub-routine. On the other hand, the tree numbering cannot be made more efficient by replacing a part of the algorithm with something smarter, so I’d say it’s the better pessimal algorithm.
That said, Slowsort is still my favourite, for it has all the properties of a good sorting algorithm: stable, easy to parallelize, easily proven correct, easily made in-place.