Choose an Algorithm to Visualize
Launch interactive workspace with step scrubbing, live pseudocode, and state metrics.
Bubble Sort
Comparison-BasedIteratively compares adjacent elements and swaps them if out of order until the entire list is sorted.
Selection Sort
SelectionDivides input into sorted and unsorted segments, repeatedly finding the minimum element to append to the sorted segment.
Insertion Sort
IncrementalBuilds sorted output one element at a time by shifting elements greater than current key to the right.
Merge Sort
Divide & ConquerRecursively bisects the array, sorts each half, and merges the sorted sublists back in linear time.
Quicksort
Divide & ConquerSelects a pivot element and partitions the array into sub-arrays of lesser and greater values.
Heap Sort
Tree-BasedTransforms the array into a binary max-heap in-place, then repeatedly extracts the root maximum.
Counting Sort
Non-ComparisonTabulates frequencies of distinct integer values and uses prefix sums to place items directly in order.
Radix Sort
Non-ComparisonProcesses integer digits or string keys position-by-position using stable counting sort passes.
Bucket Sort
DistributionDistributes elements into uniformly spaced buckets, sorts each bucket, and concatenates results.
Shell Sort
Diminishing StrideSorts distant pairs using a diminishing gap sequence, accelerating final insertion passes.
TimSort
Adaptive HybridCombines merge sort and binary insertion sort to exploit natural ordered runs in real-world data.
Comb Sort
Turtle EliminationShrinks gap by 1.3 each pass to rapidly eliminate small values trapped near the end of the array.
Cocktail Shaker Sort
Bidirectional BubbleAlternates forward and backward bubbling passes with contracting boundaries from both ends.
Gnome Sort
Single PointerSingle-pointer sort stepping forward on ordered items and swapping backward on inversions.
Cycle Sort
Write-OptimalTheoretically minimizes memory writes (≤ n-1 writes) by rotating elements along permutation cycles.
Pigeonhole Sort
Slot DistributionAssigns elements to discrete range-indexed pigeonholes followed by linear sequential collection.
Tree Sort
BST In-OrderInserts elements into a Binary Search Tree and performs an in-order traversal to emit sorted keys.
Strand Sort
Strand MergeRepeatedly pulls greedy non-decreasing sub-lists from an unsorted pool and merges them into sorted output.
Pancake Sort
Prefix ReversalSorts strictly through prefix reversals ("spatula flips") within at most 2n - 3 operations.
Stooge Sort
Overlapping 2/3Recursive algorithm sorting first 2/3, last 2/3, and first 2/3 overlapping partitions with O(n^2.71) time.
Introsort
Triple HybridBegins with Quick Sort, falls back to Heap Sort when depth exceeds 2*floor(log2(n)), and uses Insertion Sort for small slices.