NeatSort - A practical adaptive algorithm
Abstract
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.
- Publication:
-
arXiv e-prints
- Pub Date:
- July 2014
- DOI:
- 10.48550/arXiv.1407.6183
- arXiv:
- arXiv:1407.6183
- Bibcode:
- 2014arXiv1407.6183L
- Keywords:
-
- Computer Science - Data Structures and Algorithms;
- 68W01;
- 68W40;
- C.2.2
- E-Print:
- 23 pages, 20 figures