Learn algorithms by watching them run.
52 step-by-step animations show exactly what the code does: every comparison, swap, recursive call and proof step. Then change the input and watch it again.
No sign-up. Works on your phone.
Pick a topic and press play
Counting steps
How much work does code do? Count every line, add it up into T(n), and find the Big-O.
All 12 animations →Growth rates and Big-O
Big-O, Big-Ω and Big-Θ, proved with c and n₀ and drawn on a graph.
- Which function grows fastest?
- Prove 3n² + 5n + 2 is O(n²)
- Prove 2n + 10 is O(n)
- Prove 3n² + 5n + 2 is Ω(n²)
Limits and loop invariants
Compare growth with limits, and prove loops correct with invariants.
All 3 animations →Sorting
Watch the classic sorts swap, shift and settle, with the code running alongside.
All 3 animations →Recursion
How recursive calls run on the call stack, and how to write their recurrences.
- How recursion runs: fact(4)
- Recurrence for factorial
- Recurrence for binary search
- Recurrence for merge sort
Solving recurrences
Four methods: iteration, substitution, recursion trees and the Master Theorem.
All 13 animations →Binary search trees
Insert, search, delete, min, max, successor, predecessor and traversals. Build your own tree.
All 11 animations →Analyse your own code
Paste any C function. Prof. Bolts runs it, counts every line, and works out T(n) and the Big-O as an animation.
Try it →Analysis of Algorithms
52 animations from counting steps to recurrences, the Master Theorem and binary search trees.
Browse all animations →Data Structures
Linked lists, stacks, queues, heaps, hashing and more, animated the same way.
Algorithms on one page
Big-O rules, proof patterns, recurrences and the Master Theorem cases on a single sheet, plus new animations as they go live. No spam.
Thanks! Check your inbox for the cheat sheet.
A robot that shows every step
Prof. Bolts works through each idea in front of you, points at the line that is running and writes the working on the board. Every animation is built around the step students usually get stuck on. Prefer reading? There are short notes for some topics too. About Prof. Bolts.