Skip to content
{}

31 lessons · ~11 hours

The curriculum

Take it in order — each phase leans on the one before. Every lesson has a visualizer or experiment, a from-scratch implementation, a quiz and a tested code challenge.

Start lesson 01 — free

Phase 0

Code Fluency

The dozen loop, swap and pointer blocks every algorithm is built from — traced line by line in Python and C++ until you can write them without thinking.

0/4 complete
  1. 01Loops & Bounds: for and while Without GuessingOne rule decides every loop condition you will ever write: find the largest index the body touches. 30 min visualizer code lab
  2. 02Swap, Reverse & Shift: Moving Values in PlaceFour moves — swap, reverse, shift-insert, neighbour-swap — are inside every in-place algorithm you will write. 30 min visualizer code lab
  3. 03Trackers & Flags: Remembering What You've SeenTotals, running best, found-flags and counters — the variables that carry information from one iteration to the next. 25 min visualizer code lab
  4. 04Two Indexes, One Loop: Merge, Compact & PartitionWhen one index isn't enough: two pointers that move at different times are behind merge sort, quick sort and half of all array problems. 30 min visualizer code lab

Phase 1

How Computers Think

Cost models, reading a problem, memory, and recursion — the lens every later lesson is viewed through.

0/4 complete
  1. 05Big-O: Counting Steps, Not SecondsWhy an algorithm that is fast on 10 items can freeze on 10 million. 15 min visualizer code lab
  2. 06How to Read a Problem: Constraints, Clues & Complexity BudgetsBefore you write a line of code, the problem statement has already told you which algorithm to use. 25 min visualizer code lab
  3. 07Arrays & Memory: Boxes in a RowWhy reading index 5,000 is instant but inserting at the front is slow. 18 min visualizer code lab
  4. 08Recursion & the Call StackA function that calls itself — and the invisible stack that makes it work. 20 min visualizer code lab

Phase 2

Linear Structures

Arrays, linked lists, stacks, queues and hash tables — built by hand, pointer by pointer.

0/6 complete
  1. 09Prefix Sums: Any Range Sum in O(1)Spend one pass building running totals, then answer every 'sum from l to r' question with a single subtraction. 25 min visualizer code lab
  2. 10Difference Arrays & Sweep Lines: Many Range Updates, One PassRecord where each change starts and stops, then let one running sum apply them all. 25 min visualizer code lab
  3. 11Strings: Build, Count & MatchStrings are arrays of characters with one twist — in Python they can't be changed. Four blocks cover most string problems. 30 min visualizer code lab
  4. 12Linked Lists: Following PointersTrade instant indexing for instant insertion anywhere you already stand. 20 min visualizer code lab
  5. 13Stacks & Queues: Order Is the FeatureLast-in-first-out vs first-in-first-out — two tiny rules that power undo, parsing and BFS. 16 min visualizer code lab
  6. 14Hash Tables: O(1) Lookup by Magic MathTurn any key into an array index — and handle the collisions that follow. 22 min visualizer code lab

Phase 3

Searching & Sorting

Binary search and six sorting algorithms, raced side by side with live comparison counters.

0/4 complete
  1. 15Binary Search: Halve and ConquerFind anything among a billion sorted items in about 30 guesses. 18 min visualizer code lab
  2. 16Bubble, Selection & Insertion SortThree O(n²) sorts — and why insertion sort still ships in production. 20 min visualizer code lab
  3. 17Merge Sort: Divide, Conquer, CombineGuaranteed O(n log n) by splitting until trivial, then zipping back together. 20 min visualizer code lab
  4. 18Quick Sort & PartitioningPick a pivot, split around it, recurse — the fastest sort in practice. 22 min visualizer code lab

Phase 4

Trees

Binary trees, BSTs, heaps and tries — hierarchy as a data structure.

0/4 complete
  1. 19Binary Trees & TraversalsPre-order, in-order, post-order, level-order — four ways to visit every node. 22 min visualizer code lab
  2. 20Binary Search TreesKeep smaller values left and larger values right — and search becomes O(log n). 22 min visualizer code lab
  3. 21Heaps & Priority QueuesAlways know the smallest item — in O(1) — while inserting in O(log n). 22 min visualizer code lab
  4. 22Tries: Trees of CharactersThe data structure behind autocomplete, spell-check and IP routing. 18 min visualizer code lab

Phase 5

Graphs

BFS, DFS, topological sort, Dijkstra and union-find on graphs you can step through.

0/4 complete
  1. 23Graphs & Breadth-First SearchModel anything connected — then explore it ring by ring. 24 min visualizer code lab
  2. 24Depth-First Search & Topological SortGo deep, backtrack, and order tasks so every dependency comes first. 24 min visualizer code lab
  3. 25Dijkstra's Shortest PathsGreedy exploration with a priority queue finds the cheapest route. 24 min visualizer code lab
  4. 26Union-Find (Disjoint Sets)Merge groups and ask 'same group?' in nearly constant time. 18 min visualizer code lab

Phase 6

Problem-Solving Patterns

Two pointers, sliding window, backtracking, greedy and dynamic programming — the interview toolkit.

0/5 complete
  1. 27Two PointersTwo indices moving with purpose turn O(n²) pair searches into O(n). 16 min visualizer code lab
  2. 28Sliding WindowReuse the work from the last window instead of recomputing the next one. 18 min visualizer code lab
  3. 29BacktrackingTry a choice, recurse, undo it — systematic search with early pruning. 22 min visualizer code lab
  4. 30Greedy AlgorithmsTake the best-looking step now — and prove it never hurts later. 16 min visualizer code lab
  5. 31Dynamic ProgrammingRecursion + memory: solve each subproblem once and build the answer up. 28 min visualizer code lab