Skip to main navigation Skip to search Skip to main content

INSERTION SORT is O(n log n)

  • Rutgers - The State University of New Jersey, New Brunswick

Research output: Contribution to journalArticlepeer-review

46 Scopus citations

Abstract

Traditional INSERTION SORT runs in O(n2) 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.

Original languageEnglish
Pages (from-to)391-397
Number of pages7
JournalTheory of Computing Systems
Volume39
Issue number3
DOIs
StatePublished - Jun 2006

Fingerprint

Dive into the research topics of 'INSERTION SORT is O(n log n)'. Together they form a unique fingerprint.

Cite this