Showing Posts From

Recursion

Backtracking: An Intro

Backtracking: An Intro

Week 17 notes: backtracking explores every candidate by building it up step by step and undoing dead ends. The choose/explore/un-choose template, and why pruning is everything.

Recursion II: Divide & Conquer, Memoization

Recursion II: Divide & Conquer, Memoization

Week 9 notes: two ideas that take recursion from cute to actually powerful. Splitting problems in half, and caching subproblems so you never redo work.

Recursion I: Base Cases & the Call Stack

Recursion I: Base Cases & the Call Stack

Week 8 notes: recursion felt like magic until I actually pictured the call stack. Writing correct base cases, trusting the recursive call, and reading recurrences.