Algorithms
Algorithms, explained from the slow way up
34 interview classics and 32 ideas that run the internet. Each starts from code that already works, and every one runs in your browser.
The shape of every puzzle
Something goes in, an answer comes out. A vending machine: coin in, snack out. Your function is the machine.
Hash maps
Remember what you’ve seen. A coat check: hand over your ticket and get your coat back instantly, however many coats there are.
Two pointers
Two fingers walking. Two friends reading a word from opposite ends, meeting in the middle.
Sliding window
Update, don’t recount. A train window: one tree leaves on the left as another arrives on the right.
Stacks
Last in, first out. A pile of plates: you only ever touch the top one.
Binary search
Throw away half. Guess my number from 1 to 100. “Higher!” “Lower!” Seven guesses are always enough.
Heaps
Always know the biggest. A hospital waiting room: the most urgent patient is always seen next.
Trees & recursion
Solve the small one first. Russian dolls: open one, and inside is a smaller doll of the same kind.
Graphs & grids
Spread out in rings. Drop a stone in a pond: the ripple reaches everything one step away, then two steps…
Dynamic programming
Write the answer down. A sticky note for every sum you’ve worked out, so you never work it out twice.
Backtracking
Try, undo, try again. A maze: walk until you hit a dead end, step back, try the next turn.
Sort, then sweep
Put things in order first. Tidying a messy calendar by laying the meetings out from morning to night.
Design a tiny system
Pick the right container. The books on your desk vs. the library: keep what you use close at hand.
In the real world: maps & places
In the real world: huge scale
In the real world: counting & data
In the real world: working together
In the real world: safety nets
Or bring your own.
Paste any public GitHub link and see how it’s built. Free, nothing to install.