English

Sorting distinct integers using improved in-place associative sort

Data Structures and Algorithms 2012-09-24 v1

Abstract

In-place associative integer sorting technique was proposed for integer lists which requires only constant amount of additional memory replacing bucket sort, distribution counting sort and address calculation sort family of algorithms. Afterwards, the technique was further improved and an in-place sorting algorithm is proposed where n integers S[0...n-1] each in the range [0, n-1] are sorted exactly in O(n) time while the complexity of the former technique was the recursion T(n) = T(n/2) + O(n) yielding T(n) = O(n). The technique was specialized with two variants one for read-only distinct integer keys and the other for modifiable distinct integers, as well. Assuming w is the fixed word length, the variant for modifiable distinct integers was capable of sorting n distinct integers S[0...n-1] each in the range [0, m-1] in exactly O(n) time if m < (w-logn)n. Otherwise, it sort in O(n + m/(w-logn)) time for the worst, O(m/(w-logn)) time for the average (uniformly distributed keys) and O(n) time for the best case using only O(1) extra space. In this study, the variant for modifiable distinct integers is improved and an algorithm is obtained that sorts n distinct integers S[0...n-1] each in the range [0, m-1] in exactly O(n) time if m < (w-1)n. Otherwise, it sort in O(n + m/(w-1)) time for the worst, O(m/(w-1)) time for the average (uniformly distributed keys) and O(n) time for the best case using only O(1) extra space.

Keywords

Cite

@article{arxiv.1209.4714,
  title  = {Sorting distinct integers using improved in-place associative sort},
  author = {A. Emre Cetin},
  journal= {arXiv preprint arXiv:1209.4714},
  year   = {2012}
}

Comments

16 pages. arXiv admin note: substantial text overlap with arXiv:1209.3668, arXiv:1209.1942, arXiv:1209.0572

R2 v1 2026-06-21T22:08:50.757Z