Algorithms, visualised step by step
Each page pairs a careful written explanation with a visualiser you can drive yourself: change the input, step forwards and backwards, and watch the pseudocode follow along.
- Explainer
Big-O notation
Count the steps in real loops, then compare n, n log n, n² and 2ⁿ on a live chart.
Try it: Growth-curve chart and a step counter for five loop shapes - Explainer
Recursion
Watch frames push and pop on the call stack for factorial and Fibonacci.
Try it: Call-stack stepper for factorial, Fibonacci and memoised Fibonacci - Explainer
BFS vs DFS
A queue against a stack: draw a graph and see which order each search visits it in.
Try it: Graph-traversal visualiser (BFS and DFS on a drawable graph) - Explainer
Sorting algorithms
Seven sorts on the same input, with comparison, swap and write counts side by side.
Try it: Sorting visualiser with seven algorithms and a comparison table - Explainer
Binary search
Halve the range, probe the middle, repeat: with lo, mid and hi drawn on the array.
Try it: Binary-search stepper with classic and lower-bound variants
How to use these pages
Every visualiser works the same way. Edit the input at the top, then press play or step one move at a time with the arrow keys. The highlighted line of pseudocode is the one being executed, and the narration underneath says what just happened and why. Step backwards as often as you like: the whole run is computed in advance, so rewinding is instant.
A good order for a first pass is Big-O notation, which gives you the vocabulary for comparing algorithms, then binary search and sorting. Recursion explains the call stack that merge sort, quicksort and depth-first search rely on, and BFS vs DFS moves from arrays to graphs.
Related tools
The graph traversal visualiser adds Dijkstra’s algorithm to BFS and DFS, and the recursion tree visualiser draws the call tree of any small recursive function you write, or solves a divide-and-conquer recurrence.