Explore complexity, stability, and implementation details.
Partitions values into less than, equal to, and greater than a pivot.
Uses Batcher’s odd-even merge network to sort power-of-two wires.
A variant of Insertion Sort that uses binary search to find the correct position for the next element, significantly reducing the number of comparisons.
Runs fixed compare-exchange stages that build and merge bitonic sequences.
A famously inefficient algorithm that repeatedly generates random permutations of a list until it discovers one that is sorted.
A monumentally inefficient recursive sorting algorithm that sorts the first n-1 elements before checking the nth, leading to an astronomically large complexity.
Iteratively merges adjacent runs of doubling length.
A terribly inefficient algorithm that, if the list is not sorted, swaps two randomly chosen elements and checks again.
The simplest sorting algorithm that repeatedly swaps adjacent elements if they are in the wrong order.
Places values in range buckets, sorts each bucket, and concatenates them.
Keeps strings in trie buckets and bursts full buckets into deeper character branches.
Builds a min Cartesian tree and extracts roots through a priority queue.
A bidirectional variation of Bubble Sort that sorts in both directions on each pass to improve performance by moving elements to their correct position more quickly.
An improvement on Bubble Sort that eliminates "turtles" (small values near the end) by comparing and swapping elements that are far apart.
An integer sorting algorithm that operates by counting the number of objects that possess distinct key values, then using arithmetic to determine the positions of each key value in the output sequence.
An in-place, unstable sorting algorithm that is theoretically optimal in terms of the total number of writes to the original array.
Shows map, shuffle, local sort, and gather phases across virtual workers.
Uses two pivots to form three quicksort partitions.
Classifies values, permutes them into range classes, then finishes with insertion sort.
A simple sorting algorithm that moves an element to its correct place through a series of adjacent swaps, resembling a garden gnome sorting flower pots.
A stable block merge sort using internal keys and a constant amount of extra sort memory.
A comparison-based sorting algorithm that uses a Binary Heap data structure. It is an optimized version of selection sort that builds a Max-Heap to efficiently find the maximum element.
Recursively sorts halves and stably rotation-merges them without a value buffer.
Builds the final sorted array one item at a time by repeatedly taking the next element and inserting it into its correct position among the already-sorted elements.
Partitions signed 32-bit integers by high-order bits and comparison-sorts small leaves.
A sorting algorithm based on the theological theory of intelligent design.
A hybrid sorting algorithm that provides both fast average performance and optimal worst-case performance by combining Quick Sort, Heap Sort, and Insertion Sort.
Inserts randomized input into a sorted sparse array and periodically rebalances gaps.
A highly reliable, stable sorting algorithm that works by recursively dividing the array into halves, sorting them, and merging them back together.
A humorous algorithm that repeatedly checks if an array is sorted, waiting for a "miracle" to spontaneously sort the data.
Finds ordered runs already present in the input and merges them.
A variation of Bubble Sort that sorts by repeatedly applying comparison and swap operations to elements in separate "odd" and "even" phases.
Sorts a stack of elements (pancakes) by repeatedly flipping the spatula under the largest unsorted element to move it to the top, then flipping the whole stack to move it to the bottom.
Uses fork-join merge decomposition with independent output ranges.
A sorting algorithm based on the card game "Patience". It sorts by distributing elements into piles according to specific rules, then merging the piles efficiently using a priority queue.
Uses one slot per integer key in the input range.
A hypothetical algorithm that generates a single random permutation of a list, and if it is not sorted, destroys the universe.
An efficient, divide-and-conquer algorithm that works by selecting a "pivot" element and partitioning the other elements into two sub-arrays.
A non-comparative sorting algorithm that sorts integers by processing them digit by digit, from least significant to most significant.
Chooses a random pivot before each quicksort partition.
Runs Shellsort gap passes in random order, ending with gap one.
Chooses sample splitters, partitions data, sorts buckets, and concatenates them.
A simple sorting algorithm that repeatedly finds the minimum element from the unsorted part and puts it at the beginning.
An optimization of Insertion Sort that allows the exchange of items that are far apart, improving efficiency by moving elements to their correct position more quickly.
Inserts values into a randomized multilevel linked list.
A humorous and notoriously inefficient sorting algorithm based on the parody principle of 'multiply and surrender'.
A variation of Heapsort that uses a forest of Leonardo-number-sized heaps to adapt to pre-sorted input, achieving O(n) best-case time while maintaining O(1) auxiliary space.
Inserts values into a self-adjusting splay tree, then traverses it in order.
A ruthless and efficient single-pass algorithm that eliminates any element that is out of order, sending it to the Gulag.
A highly inefficient recursive sorting algorithm that works by recursively sorting overlapping two-thirds sections of the array.
A recursive sorting algorithm that repeatedly pulls the longest increasing subsequence (strand) from the list and merges it into a sorted output.
Builds the suffix array of one text by classifying and inducing suffix positions.
A simple calculus. This universe is finite, its resources finite. If data is left unchecked, it will cease to be ordered. It needs correction.
Uses a winner tree to repeatedly select the smallest remaining value.
Combines binary-search ordering with random heap priorities.
A sorting algorithm that builds a Binary Search Tree (BST) from the input elements and then performs an in-order traversal to retrieve the elements in sorted order.
Inserts strings into a character trie and emits them in lexicographic order.