
83 interactive visualizers covering every core data structure and algorithm - from what an array is in memory to Manacher, segment trees and A*. Step through them one operation at a time, in either direction, with the code lighting up beside you.
An animation shows you what changed. Everything below exists to show you why.
Every algorithm compiles to an immutable list of frames, so rewinding is exact and free. Miss the moment a pivot settles? Scrub back to it. Most visualizers can only play forwards.
The executing line is highlighted in step with the animation, so you see which line does the partitioning rather than just that partitioning happened. Real Python, JavaScript, Java and C++ sit alongside.
Type your own array, drag graph nodes and connect them by tapping, paint a maze, change edge weights. The worst case is a button away - and so is your own failing test case.
Comparisons, swaps, reads, writes and recursion depth are counted as you watch, then shown against n, n log n and n² for your exact input. The numbers make the notation concrete.
The same transport, keyboard shortcuts and speed control drive all 83 visualizers. Learn the controls once; the effort goes into the algorithm instead of the interface.
Not a shrunken desktop layout. The controls pin to the bottom of the viewport, editors take touch input, and every diagram is resolution-independent SVG.
Before any algorithm makes sense: how an array sits in memory, what a recursive call costs, and what the gap between n log n and n² feels like at scale rather than on paper.
Watch the growth curves separate as n climbs.
Why indexing is O(1) and inserting at the front is not.
O(n) insert/deleteOpenPush values and watch the capacity double.
O(1) amortisedOpenWatch fib(n) build an exponential tree, then memoise it away.
O(2ⁿ) naiveOpenThree lines of recursion, 2ⁿ − 1 provably optimal moves.
O(2ⁿ)OpenSet, clear, toggle - and the two identities worth memorising.
O(1) per operationOpenThe classic showcase, and the fairest comparison in the module: every sort drives the same bar chart and counts comparisons and swaps identically, so the differences between them are the only thing left to see.
Repeatedly swap neighbours until nothing moves.
O(n²)OpenFind the minimum, move it to the front, repeat.
O(n²)OpenHow you sort a hand of cards.
O(n²)OpenInsertion sort that can move things a long way.
depends on the gapsOpenSplit to single elements, then merge back in order.
O(n log n)OpenPartition around a pivot, then recurse on both halves.
O(n log n)OpenBuild a heap in the array, then extract the maximum n times.
O(n log n)OpenSorting with zero comparisons.
O(n + k)OpenSort by the last digit, then the next, and it comes out ordered.
O(d(n + b))OpenScatter by value range, sort each bucket, concatenate.
O(n + n²/b + b)OpenLinear, binary and the family of variants built on it - including binary search on the answer, which is the technique interviewers actually test.
Check every position until you find it.
O(n)OpenHalve the search space with every comparison.
O(log n)OpenThe half-open variant that handles duplicates.
O(log n)OpenSkip in blocks of √n, then scan backwards.
O(√n)OpenDouble the reach until you overshoot, then binary search.
O(log i)OpenGuess where the value should be, like using a phone book.
O(log log n)OpenThe interview version: search a predicate, not an array.
O(log(range) × cost of the check)OpenPointer-based structures where the arrows are drawn explicitly, because the arrows are the point. Includes the two that turn up constantly in interviews: the monotonic stack and the LRU cache.
O(1) at the head, a walk for everything else.
O(n) searchOpenA back pointer buys O(1) deletion.
O(n) searchOpenThe tail points back at the head.
O(n) searchOpenThree pointers, and the order of four lines is everything.
O(n)OpenTortoise and hare, in O(1) memory.
O(n)OpenLast in, first out - and both ends are O(1).
O(1) push/pop/peekOpenFirst in, first out - and why list.pop(0) is a bug.
O(1) enqueue/dequeueOpenA queue open at both ends.
O(1) at both endsOpenModulo turns a fixed array into an endless stream.
O(1)OpenNext greater element in one linear pass.
O(n)OpenA hash map and a doubly linked list, covering each other's weakness.
O(1) get and putOpenWhat happens when two keys land in the same bucket, what happens when you refuse to allocate for that, and what happens when the table fills up.
Two pointers, sliding windows, prefix sums, Kadane. Half a dozen loop shapes that between them solve a large fraction of every array question ever asked.
One comparison eliminates a whole row of the brute force.
O(n)OpenTwo operations replace k additions.
O(n)OpenGrow right, shrink left, never move backwards.
O(n)OpenPrecompute once, answer every range query in O(1).
O(1) per queryOpenRange updates in O(1), materialised once at the end.
O(n + q)OpenOne decision, repeated n times.
O(n)OpenSort 0s, 1s and 2s in a single pass.
O(n)OpenBalance is the theme: build a BST from sorted keys and watch it collapse into a linked list, then feed the same keys to an AVL tree and watch the rotations refuse to let that happen.
Pre, in, post and level order - recursive and iterative.
O(n)OpenInsert, search and the three cases of deletion.
O(log n)OpenFour rotation cases that refuse to let the tree lean.
O(log n)OpenAn array pretending to be a tree.
O(log n)OpenThe path is the key.
O(length of the key)OpenRange queries and point updates, both O(log n).
O(log n) query and updateOpenPrefix sums in one array, driven by the lowest set bit.
O(log n)OpenEvery graph here is editable - drag nodes, tap two of them to connect, tap a weight to change it. The interesting questions in this category are all 'what if', so the input has to be yours.
The same graph, three ways, with very different costs.
O(V) matrix neighboursOpenExpands in rings, so it finds shortest paths.
O(V + E)OpenA stack instead of a queue - that is the only difference.
O(V + E)OpenKahn's algorithm, with cycle detection for free.
O(V + E)OpenSettle the closest unvisited node, then relax its edges.
O((V + E) log V)OpenSlower than Dijkstra, but it survives negative weights.
O(V·E)OpenAll pairs, three nested loops, one line of logic.
O(V³)OpenPath compression and union by rank, together.
O(α(n)) ≈ O(1)OpenCheapest edge first, skipping anything that closes a cycle.
O(E log E)OpenDijkstra with one line changed.
O(E log V)OpenPaint a maze and watch three algorithms solve it differently.
O(E log V)OpenWatch the naive matcher throw away a four-character partial match, then watch KMP refuse to. All five matchers share one visual, so the difference between them is impossible to miss.
Slide one place right and start over.
O(n)OpenThe text pointer never moves backwards.
O(n + m)OpenA rolling hash, and why verification is not optional.
O(n + m)OpenHow far does the prefix repeat at every position?
O(n)OpenLongest palindromic substring in O(n).
O(n)OpenOne three-line skeleton, five very different problems. The N-Queens visualizer lets you switch pruning off and watch the node count explode, which is the entire lesson.
Switch pruning off and watch the search explode.
O(n!)OpenTry, recurse, undo - plus one ordering trick.
O(9^empty cells)OpenSwap in place, recurse, swap back.
O(n × n!)OpenOne binary decision per element - and a bitmask does the same job.
O(n × 2ⁿ)OpenWatch corridors light up and go dark again.
O(4^(rows×cols))OpenGreedy is easy to write and hard to justify. Each visualizer shows the greedy choice next to the near-miss that makes the proof necessary, including two cases where greedy is simply wrong.
Earliest finish time - and two plausible rules that fail.
O(n log n)OpenDensest first, and split the last item.
O(n log n)OpenMerge the two rarest symbols, repeatedly.
O(n log n)OpenGreedy works for real currencies and fails for made-up ones.
O(amount × coins) DPOpenThe hard part of DP is never the code - it is seeing the table. Every cell draws an arrow to the cells it reads, and the traceback walks those arrows back to recover the actual answer.
One subproblem per amount, and no first choice can trap it.
O(amount × coins)OpenTake it or leave it, at every capacity.
O(n × W)OpenMatch means diagonal; mismatch means the better of two.
O(m × n)OpenThree neighbours, three edits, one minimum.
O(m × n)OpenThe O(n²) table, and the O(n log n) trick that replaces it.
O(n²) DPOpenTwo choices per house, and the table collapses to two variables.
O(n)OpenCounting problems reduce to a sum of two neighbours.
O(rows × cols)OpenPreparing for interviews rather than studying the mechanics? The system design, Python full-stack and AI/ML engineering modules cover the question-and-answer side.