Fast Sorting In-Place Sorting with O(n) Data

Until recently, it was not known whether it was possible to stably sort (Le. keeping equal elements in their initial order) an array of n elements using only O(n) data movements and O(1) extra space. In [10], an algorithm was given to perform this task in O(n2) comparisons in the worst case. Here, we develop a new algorithm for the problem that performs only O(n1+e) comparisons (0<e<1 is any fixed constant) in the worst case. This bound on the number of comparisons matches (asymptotically) the best known bound for the same problem with the stability constraint dropped.