English

NeatSort - A practical adaptive algorithm

Data Structures and Algorithms 2014-07-24 v1

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 XX, our algorithm has a theoretical Ω(X)\Omega (|X|) lower bound and a O(XlogX)\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.

Keywords

Cite

@article{arxiv.1407.6183,
  title  = {NeatSort - A practical adaptive algorithm},
  author = {Marcello La Rocca and Domenico Cantone},
  journal= {arXiv preprint arXiv:1407.6183},
  year   = {2014}
}

Comments

23 pages, 20 figures

R2 v1 2026-06-22T05:10:51.635Z