An in-place sorting with O(n log n) comparisons and O(n) moves
Gianni Franceschini, Viliam Geffert · 2004
We present the first in-place algorithm for sorting an array of size n that performs, in the worst case, at most O(n log n) element comparisons and O(n) element transports. This solves a long-standing open problem, stated explicitly, e.g., in J.I. Munro and V. Raman (1992), of whether there exists a sorting algorithm that matches the asymptotic lower bounds on all computational resources simultaneously.