Skip to content
Free. No login. Progress saved in your browser.

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.

Linear searchchecks 0
Binary searchchecks 0

Looking for 68, at position 23 of 32
0%

Start with the first lesson

27 lessons and 21 problems. Nothing to install or sign up for.

Start learning

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.

Module 01

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.

3 lessons, 3 problemsNot started
Module 02

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.

3 lessons, 3 problemsNot started
Module 03

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.

3 lessons, 2 problemsNot started
Module 04

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.

3 lessons, 3 problemsNot started
Module 05

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.

3 lessons, 2 problemsNot started
Module 06

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.

3 lessons, 2 problemsNot started
Module 07

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.

3 lessons, 2 problemsNot started
Module 08

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.

3 lessons, 2 problemsNot started
Module 09

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.

3 lessons, 2 problemsNot started

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.

All 44 posts