Computing Atlas

How Computing Was Built
Sign In
Text size
100%
Theme
Browse By

All Comparison Sorting Algorithms

Sorting algorithms that put items in order only by comparing pairs of them, such as heapsort, insertion sort, selection sort and Shellsort. An algorithm belongs here when its cited article calls it a comparison sort or a comparison-based sorting algorithm. Every method in this group needs on the order of n log n comparisons in the worst case at best, a limit that comes from the comparison model itself. It excludes the radix, counting and bucket sorts, which place items by their keys and sit in the distribution and integer group.

All Comparison Sorting Algorithms
Filter Results22 entries
Sources
Tournament Sort (Wikipedia)
Has Member: Tournament Sort, Lead
Quote, Has Member: Tournament Sort, Lead
Tournament sort is a sorting algorithm. It improves upon the naive selection sort by using a priority queue
View the Source
Wikipedia, Heapsort
Has Member: Heapsort, Lead section
Quote, Has Member: Heapsort, Lead section
efficient, comparison-based sorting algorithm
View the Source
Wikipedia, Insertion sort
Has Member: Insertion Sort, Lead section
Quote, Has Member: Insertion Sort, Lead section
builds the final sorted array (or list) one item at a time by comparisons
View the Source
Wikipedia, Selection sort
Has Member: Selection Sort, Lead section
Quote, Has Member: Selection Sort, Lead section
in-place comparison sorting algorithm
View the Source
Wikipedia: Shellsort
  • Has Member: Shell Sort, Lead section
    is an in-place comparison sort
  • Has Member: Shellsort Algorithm, Lead section
    is an in-place comparison sort
View the Source
Smoothsort (Wikipedia)
Has Member: Smoothsort, Lead section
Quote, Has Member: Smoothsort, Lead section
comparison-based sorting algorithm
View the Source
Wikipedia, Bubble sort
Has Member: Bubble Sort, Lead section
Quote, Has Member: Bubble Sort, Lead section
comparing the current element with the one after it
View the Source
Wikipedia: Timsort
Wikimedia FoundationHas Member: Timsort, Lead
Quote, Has Member: Timsort, Lead
Timsort is a hybrid, stable sorting algorithm, derived from merge sort and insertion sort, designed to perform well on many kinds of real-world data.
View the Source
Wikipedia: Introsort
Wikimedia FoundationHas Member: Introsort, Lead
Quote, Has Member: Introsort, Lead
Introsort or introspective sort is a hybrid sorting algorithm that provides both fast average performance and (asymptotically) optimal worst-case performance.
View the Source
Wikipedia: Comb sort
Has Member: Comb Sort Algorithm, Lead
Quote, Has Member: Comb Sort Algorithm, Lead
Comb sort is a relatively simple sorting algorithm originally designed by Włodzimierz Dobosiewicz and Artur Borowy in 1980, later rediscovered (and given the name "Combsort") by Stephen Lacey and Richard Box in 1991.
View the Source
Bitonic sorter (Wikipedia)
Has Member: Bitonic Mergesort, Lead
Quote, Has Member: Bitonic Mergesort, Lead
Bitonic mergesort is a parallel algorithm for sorting.
View the Source
Block sort (Wikipedia)
Has Member: Block Sort, Lead
Quote, Has Member: Block Sort, Lead
Block sort, or block merge sort, is a sorting algorithm combining at least two merge operations with an insertion sort to arrive at O(n log n) (see Big O notation) in-place stable sorting time.
View the Source
Powersort (Wikipedia)
Has Member: Powersort, Lead
Quote, Has Member: Powersort, Lead
Powersort belongs to the family of merge sort algorithms.
View the Source
Tree sort (Wikipedia)
Has Member: Tree sort, Lead
Quote, Has Member: Tree sort, Lead
Tree sort can be used as a one-time sort, but it is equivalent to quicksort as both recursively partition the elements based on a pivot, and since quicksort is in-place and has lower overhead, tree sort has few advantages over quicksort.
View the Source
Stooge sort (Wikipedia)
Has Member: Stooge sort, Lead
Quote, Has Member: Stooge sort, Lead
Stooge sort is a recursive sorting algorithm.
View the Source
NIST Dictionary of Algorithms and Data Structures: gnome sort
NIST Dictionary of Algorithms and Data StructuresHas Member: Gnome Sort, Definition
Quote, Has Member: Gnome Sort, Definition
Put items in order by comparing the current item with the previous item.
View the Source
NIST Dictionary of Algorithms and Data Structures: strand sort
NIST Dictionary of Algorithms and Data StructuresHas Member: Strand Sort, Definition
Quote, Has Member: Strand Sort, Definition
For each subsequent item in the original list, if it is greater than the last item of the sublist, remove it from the original list and append it to the sublist.
View the Source
Patience Sorting (Wikipedia)
Has Member: Patience Sorting, Lead
Quote, Has Member: Patience Sorting, Lead
In computer science, patience sorting is a sorting algorithm inspired by, and named after, the card game patience.
View the Source
Library sort (Wikipedia)
Has Member: Library Sort, Lead
Quote, Has Member: Library Sort, Lead
Library sort or gapped insertion sort is a sorting algorithm that uses an insertion sort, but with gaps in the array to accelerate subsequent insertions.
View the Source
Bogosort (Wikipedia)
Has Member: Bogosort, Lead
Quote, Has Member: Bogosort, Lead
In computer science, bogosort (also known as permutation sort and stupid sort) is a sorting algorithm based on the generate and test paradigm.
View the Source
NIST Dictionary of Algorithms and Data Structures: k-way merge
NIST Dictionary of Algorithms and Data StructuresHas Member: K-Way Merge Algorithm, Definition
Quote, Has Member: K-Way Merge Algorithm, Definition
Combine k sorted data streams into a single sorted stream.
View the Source
Comments (0)
No comments yet. Be the first to share a thought.
Reader Challenges (0)
No disputes yet. Spotted an error or a better source? Open the first one.