[prev] 67 [next]

Summary of Sort Methods

Sort an collection of N items in ascending order ...

Elementary sorts:   O(N2) comparisons

  • selection sort,   insertion sort,   bubble sort
Advanced sorts:   O(NlogN) comparisons
  • quicksort,   merge sort,   heap sort (priority queue)
Most are intended for use in-memory (random access data structure).

Merge sort adapts well for use as disk-based sort.