pith. sign in

arxiv: cs/0407003 · v1 · submitted 2004-07-01 · 💻 cs.DS

Insertion Sort is O(n log n)

classification 💻 cs.DS
keywords insertionsorttimegapshighprobabilityacceleratebecause
0
0 comments X
read the original abstract

Traditional Insertion Sort runs in O(n^2) time because each insertion takes O(n) time. When people run Insertion Sort in the physical world, they leave gaps between items to accelerate insertions. Gaps help in computers as well. This paper shows that Gapped Insertion Sort has insertion times of O(log n) with high probability, yielding a total running time of O(n log n) with high probability.

This paper has not been read by Pith yet.

discussion (0)

Sign in with ORCID, Apple, or X to comment. Anyone can read and Pith papers without signing in.