Algorithms, traced one step at a time.
9 modules, from arrays to dynamic programming. Every lesson runs the code, counts the work it does, and explains where the cost comes from.
Same 32 sorted numbers, same target, two searches. Tap any cell to move the target.
Start with the first lesson
27 lessons and 21 problems. Nothing to install or sign up for.
9 modules, in the order they build on each other.
Each one assumes only the modules before it. The ring fills in as you finish lessons and problems.
Arrays & Sequences
An array is not a list of things. It is a region of memory, laid out end-to-end, indexed by arithmetic. Once you see arrays as geometry rather than as containers, the patterns that operate on them (two pointers, sliding windows, prefix sums) stop feeling like tricks and start feeling like consequences.
The Discipline of Pointers
A linked list is the refusal to hold memory in one piece. Each node is a signpost: a small payload and an arrow pointing to the next signpost. The price is indirection; the reward is freedom: insertion and deletion at any point cost O(1) if you already have a pointer to it. This is the module where pointers stop being a syntactic curiosity and start being a design tool.
Advanced String Manipulation
Strings are arrays with a finite alphabet: usually ASCII, sometimes Unicode, occasionally just {A, C, G, T}. That constraint is a gift. A small alphabet lets you build lookup tables in constant space, hash prefixes in linear time, and compare substrings in O(1) after O(n) preprocessing. This module is about recognising when the alphabet is small enough to exploit.
The Algebra of Membership
A hash map is a machine that converts the question 'have I seen this key before?' from a linear search into a constant-time lookup. That single capability turns a surprising number of O(n²) brute-force solutions into O(n) linear-time algorithms. Learning the pattern ('keep a hash map of what you've seen, query it on each new element') is the single highest-leverage habit in this curriculum.
Recursion as Structural Induction
Trees are the first data structure where recursion stops being a cute control-flow trick and becomes the only natural language. A binary tree is either empty or a node with two subtrees. Every recursive function over a tree mirrors that definition: the base case handles the empty tree, the recursive case combines the results from the two subtrees. Once you see it, you will never write a tree algorithm iteratively again if you don't have to.
The Geometry of Optimal Substructure
Dynamic programming is not a trick. It is a discipline: when a problem's optimal answer can be assembled from optimal answers to smaller versions of the same problem, the naive exponential recursion becomes a polynomial-time algorithm, provided you can name the subproblem. This module teaches you to name it.
The Vocabulary of Relationships
Almost every problem involving connections (cities by roads, people by friendships, pages by links, tasks by dependencies) is a graph problem in disguise. Learning to recognise the shape is three-quarters of solving it. The other quarter is a small family of algorithms, BFS, DFS, topological sort, and Dijkstra, that, once understood, unlock an enormous surface of real problems.
The Price of Order
Sorting is rarely the goal. Sorting is the preparation that makes the real goal cheap: finding duplicates, computing medians, applying two-pointer techniques, answering range queries. This module focuses less on implementing sorts (the standard library will do that better than you) and more on the decision of whether to sort at all, and which algorithmic trick each sorted-input shape unlocks.
Two Hands on a Number Line
The two-pointer technique and its cousin, the sliding window, are the single most transferable patterns in this curriculum. They appear in array problems, string problems, linked-list problems, and even on graphs with a linearised structure. If you understand why they work, not just how, you will recognise them at first sight, and the O(n²) brute force will feel obviously wrong.
Watch it run
Algorithms are traced on real values, so you see each comparison happen.
Count the work
Costs are counted in front of you, then explained. Nothing is stated without the reasoning.
Keep your place
Mark lessons and problems done. It is stored in your browser, so there is no account to create.
From the blog
Short answers to the questions developers search for, with the working shown.
What is the difference between Big O and Big Theta
The difference between Big O and Big Theta is the difference between a ceiling and a measurement. Here is what each claims, worked on real step counts, and why almost everyone says Big O when they mean Big Theta.
How to optimize a brute force solution
How to optimize a brute force solution: audit its loops for repeated and discarded work, then fix each kind with the matching tool. A worked example takes a 1.3 trillion operation scan down to 20,000 steps.
Is slicing O(n) in Python?
Is slicing O(n) in Python? Yes: lists, strings, tuples and bytes copy the slice, so the cost is O(k) for k elements. Here is how that quietly turns fast algorithms slow, and how to avoid it.