ACM Home Page
Please provide us with feedback. Feedback
Best sorting algorithm for nearly sorted lists
Full text PdfPdf (501 KB)
Source
Communications of the ACM archive
Volume 23 ,  Issue 11  (November 1980) table of contents
Pages: 620 - 624  
Year of Publication: 1980
ISSN:0001-0782
Authors
Curtis R. Cook  Oregon State Univ., Corvallis
Do Jin Kim  National Semi-Conductor, Sunnyvale, CA
Publisher
ACM  New York, NY, USA
Bibliometrics
Downloads (6 Weeks): 28,   Downloads (12 Months): 151,   Citation Count: 11
Additional Information:

abstract   references   cited by   index terms   collaborative colleagues  

Tools and Actions: Request Permissions Request Permissions    Review this Article  
DOI Bookmark: Use this link to bookmark this Article: http://doi.acm.org/10.1145/359024.359026
What is a DOI?

ABSTRACT

Straight Insertion Sort, Shellsort, Straight Merge Sort, Quickersort, and Heapsort are compared on nearly sorted lists. The ratio of the minimum number of list elements which must be removed so that the remaining portion of the list is in order to the size of the list is the authors' measure of sortedness. Tests on randomly generated lists of various combinations of list length and small sortedness ratios indicate that Straight Insertion Sort is best for small or very nearly sorted lists and that Quickersort is best otherwise. Cook and Kim also show that a combination of the Straight Insertion Sort and Quickersort with merging yields a sorting method that performs as well as or better than either Straight Insertion Sort or Quickersort on nearly sorted lists.


REFERENCES

Note: OCR errors may be found in this Reference List extracted from the full text article. ACM has opted to expose the complete List rather than only correct and linked references.

 
1
Boothroyd, J. Algorithm 201: Shellsort. Comm. ACM 6, 8 (Aug. 1963), 445.
2
 
3
Elson, M. Data Structures. Sci. Res. Associates, Chicago, IlL, 1975. An excellent data structures textbook with a chapter on sorting.
4
 
5
Fredman, M.L. On computing the length of longest increasing subsequences. Discrete Math. 11 (1975), 29-35. Describes a simple algorithm using order n log n comparisons to fred the length of a longest increasing subsequence in a sequence of n distinct elements. The algorithm is also shown to be the best possible.
6
 
7
8
9
10
 
11
12
 
13
vanEmden, M.H. Algorithm 402: qsort. Comm. ACM 13, I l (Nov. 1970), 693-694.
 
14
Williams, J.W.J. Algorithm 232: Heapsort. Comm. ACM 7, 6 (June 1964), 347-348.

CITED BY  11

Collaborative Colleagues:
Curtis R. Cook: colleagues
Do Jin Kim: colleagues