Visualize an algorithm
Every entry below runs on the same deterministic execution engine: generate all steps up front, then step forwards, backwards and through the code with the exact state each moment produced.
Sorting
6 visualizationsBubble Sort
beginnerRepeatedly swap neighbouring values that are out of order.
O(n²)O(1) spacestable
Selection Sort
beginnerSelect the minimum of the unsorted region and lock it in.
O(n²)O(1) spaceunstable
Insertion Sort
beginnerGrow a sorted prefix by sliding each new value into place.
O(n²)O(1) spacestable
Merge Sort
intermediateSplit in half, sort recursively, then merge the halves.
O(n log n)O(n) spacestable
Quick Sort
intermediatePartition around a pivot, then recurse on both sides.
O(n log n)O(log n) spaceunstable
Heap Sort
intermediateBuild a max-heap, then repeatedly extract the maximum.
O(n log n)O(1) spaceunstable
Not sure where to start?
Follow the guided paths — beginner, intermediate and advanced — in order.