Algorithms Illuminated (Part 3): Greedy Algorithms and Dynamic Programming
by Tim Roughgarden
The clearest DP explanation I've read — built for intuition, not a reference shelf.
- Status
- Read · January 2022
- Bought
- January 27, 2022
- For
- Engineers who never quite internalized dynamic programming · Self-taught developers filling CS-fundamentals gaps · Interview preppers who want intuition over memorized templates
The one-paragraph verdict
Roughgarden does the one thing most algorithms books skip: he makes you derive the recurrence instead of admiring a finished one. The DP chapters — knapsack, sequence alignment, optimal binary search trees — build the same way every time, so by the third example you can see the subproblem structure coming. The greedy half (scheduling, MSTs, Huffman codes) is just as clean. The honest downside: it’s deliberately light. Pseudocode only, no runnable implementations, proofs trimmed to “the gist,” and the whole thing is thinner than a real reference. This is a teaching book, not the one you keep open while shipping.
Who should read it
Read it if dynamic programming has always felt like guessing, or if you’re self-taught and want the intuition CS programs are supposed to hand you. The companion YouTube lectures pair well with the text. Skip it if you already think in subproblems fluently, or if you want a desk reference — CLRS exists for that and this isn’t trying to compete.
Where it earned its place
This is the book that finally made DP stop feeling like a parlor trick. It didn’t teach me a new algorithm so much as a habit: when a problem looks intractable, ask what the smallest decision is and what’s left after I make it. That framing has outlived anything specific to the book, and it’s why this one stays on the shelf.
Skip it if…
You want rigor or breadth. The proofs are intentionally informal and the page count is low — if you measure an algorithms book by completeness, this will feel slight. Reach for it for clarity, not coverage.
[Algorithms Illuminated (Part 3) on Goodreads]