Course 03 · Orientation
Recursion
The gate
Functions that call themselves on a smaller input, then the structures defined that way: binary trees, search trees, heaps, and tries.
The course journey
Build one family of skills at a time
Each technique is three short lessons, and each one builds on the lesson before it. A lesson walks through one problem step by step, then hands it to you along with a few more to solve on your own.
- 01Start here
Recursion
Trust a smaller call down to a base case, split work in halves, then cache repeated calls by their arguments.
- Stage 1Call Stack & Base CasesBreak a problem into a smaller self-call plus a stopping condition1 Lesson · 3 Problems
- Stage 2Divide & Conquer SplitsSplit the input in half, solve both sides, and combine the results1 Lesson · 3 Problems
- Stage 3Memoized Recursion (Top-Down)Cache repeated subproblem results by argument key1 Lesson · 3 Problems
- 02Pro
Trees
A node, a left child, a right child. The recursion is the traversal.
Stage 1
Depth-First Tree Traversal
Stage 2
Bottom-Up Recursion
Stage 3
Level-Order BFS
- 03Pro
BST
Left subtree smaller, right subtree larger: prune a search to one path, read values in order, and pass bounds down to check the rule.
Stage 1
BST Search & Pruning
Stage 2
In-Order Sorted Traversal
Stage 3
Range Bounds & BST Validation
- 04Pro
Heap
A complete tree in an array. The smallest item is always on top.
Stage 1
Heap-Backed Priority Queue
Stage 2
Top-K Elements
Stage 3
K-Way Merge
- 05Pro
Tries
A tree of prefixes: walk one character edge per level, branch on wildcards, and steer grid or stream searches with it.
Stage 1
Prefix Tree Insertion & Lookup
Stage 2
Wildcard & Backtracking on Tries
Stage 3
Multi-Word Grid & Stream Pruning