NeatSort - A practical adaptive algorithm

We present a new adaptive sorting algorithm which is optimal for most disorder metrics and, more important, has a simple and quick implementation. On input $X$, our algorithm has a theoretical $\Omega (|X|)$ lower bound and a $\mathcal{O}(|X|\log|X|)$ upper bound, exhibiting amazing adaptive properties which makes it run closer to its lower bound as disorder (computed on different metrics) diminishes. From a practical point of view, \textit{NeatSort} has proven itself competitive with (and often better than) \textit{qsort} and any \textit{Random Quicksort} implementation, even on random arrays.

[1]  Heikki Mannila,et al.  Measures of Presortedness and Optimal Sorting Algorithms , 1985, IEEE Transactions on Computers.

[2]  Christos Levcopoulos,et al.  Sorting Shuffled Monotone Sequences , 1990, SWAT.

[3]  Derick Wood,et al.  A New Measure of Presortedness , 1989, Inf. Comput..

[4]  Alistair Moffat,et al.  A Framework for Adaptive Sorting , 1995, Discret. Appl. Math..

[5]  Alistair Moffat,et al.  Historical Searching and Sorting , 1991, ISA.

[6]  Derick Wood,et al.  A survey of adaptive sorting algorithms , 1992, CSUR.

[7]  Derick Wood,et al.  A Generic Adaptive Sorting Algorithm , 1992, Comput. J..

[8]  Steven Skiena,et al.  Encroaching lists as a measure of presortedness , 1988, BIT.

[9]  Christos Levcopoulos,et al.  A Note on Adaptive Parallel Sorting , 1989, Inf. Process. Lett..