Quicksort
A highly efficient, in-place sorting algorithm that uses divide-and-conquer strategy. Invented by Tony Hoare in 1959, it remains one of the most widely used sorting algorithms due to its excellent average-case performance and cache efficiency.
Interactive visualization available
Merge Sort
A stable, divide-and-conquer sorting algorithm with guaranteed O(n log n) performance.
Interactive visualization available
Bubble Sort
Bubble Sort is the simplest sorting algorithm that works by repeatedly swapping adjacent elements if they are in the wrong order. This process is repeated until the entire array is sorted. Named for the way larger elements 'bubble' to the top (end) of the array.
Interactive visualization available
Insertion Sort
Insertion Sort is a simple, intuitive sorting algorithm that builds the final sorted array one element at a time. It works similarly to how people sort playing cards in their hands - picking each card and inserting it into its correct position among the already sorted cards. Despite its O(n²) time complexity, Insertion Sort is efficient for small datasets and nearly sorted arrays, making it practical for real-world applications.
Interactive visualization available
Selection Sort
Selection Sort is a simple comparison-based sorting algorithm that divides the array into sorted and unsorted regions. It repeatedly selects the smallest (or largest) element from the unsorted region and moves it to the end of the sorted region. The algorithm performs the minimum number of swaps (n-1 at most), making it useful when memory writes are expensive operations.
Interactive visualization available
Heap Sort
A comparison-based sorting algorithm that uses a binary heap data structure. Invented by J. W. J. Williams in 1964, it combines the better attributes of merge sort and insertion sort. Heap sort divides its input into a sorted and an unsorted region, and iteratively shrinks the unsorted region by extracting the largest element and inserting it into the sorted region.
Interactive visualization available
Counting Sort
A non-comparison based integer sorting algorithm that operates by counting the number of objects having distinct key values, then calculating the position of each object in the output sequence. It's efficient when the range of input data (k) is not significantly greater than the number of objects to be sorted (n).
Interactive visualization available
Radix Sort
A non-comparative integer sorting algorithm that sorts data with integer keys by grouping keys by individual digits which share the same significant position and value. Radix sort dates back to 1887 to the work of Herman Hollerith on tabulating machines.
Interactive visualization available
Bucket Sort
Distribution sort that distributes elements into buckets, then sorts each bucket individually. Works well when input is uniformly distributed. Combines with insertion sort for bucket sorting.
Interactive visualization available
Shell Sort
Generalized insertion sort using gap sequences. Invented by Donald Shell in 1959. Sorts elements at specific intervals (gaps), gradually reducing gap to 1. More efficient than insertion sort for larger arrays.
Interactive visualization available
Tim Sort
Hybrid sorting algorithm derived from merge sort and insertion sort. Python's built-in sort and Java's Arrays.sort. Invented by Tim Peters in 2002. Exploits runs of consecutive sorted elements.
Interactive visualization available
Cocktail Shaker Sort
Bidirectional bubble sort that passes through the list in both directions each iteration, moving large items to the end and small items to the beginning.
Interactive visualization available
Comb Sort
Bubble-like sort that eliminates small-value turtles using a shrinking gap between compared elements.
Interactive visualization available
Gnome Sort
Insertion-like algorithm that swaps adjacent out-of-order elements and steps back until in order.
Interactive visualization available
Pancake Sort
Sorts using only prefix flips: brings the current maximum to front then flips it to its final position at the end of the prefix.
Interactive visualization available
Patience Sort
Card-game-inspired sorting building piles with binary search and merging pile tops via a min-heap.
Interactive visualization available
Cycle Sort
In-place sorting minimizing writes by rotating cycles of elements into position.
Interactive visualization available
Strand Sort
Extract increasing strands from input and merge them into the result until input is empty.
Interactive visualization available
Wiggle Sort (Wave Sort)
Reorders array to a0 ≤ a1 ≥ a2 ≤ a3 … using a single pass of local swaps.
Interactive visualization available
Bead Sort (Gravity Sort)
Physical sorting algorithm simulating gravity on beads, O(n) or O(√n) depending on implementation.
Interactive visualization available
Binary Insertion Sort
Insertion sort using binary search to find insertion position, reducing comparisons to O(n log n).
Interactive visualization available
Bitonic Sort
Parallel sorting algorithm for power-of-2 size arrays using bitonic sequences.
Interactive visualization available
Bogo Sort (Stupid Sort)
Randomizes array until sorted. Worst-case unbounded. Used only for humor/education.
Interactive visualization available
Stooge Sort
Recursive sorting dividing into thirds. O(n^2.7). Educational curiosity.
Interactive visualization available