Dynamic Programming,
Visually.
Stop memorizing patterns. Build the intuition. Every recurrence is animated step-by-step. Watch a DP table fill cell by cell, trace the dependencies, scrub backward to any moment, and rebuild the whole thing with a different input.
What is DP?
Those who cannot remember the past are condemned to repeat it. Dynamic programming is a way to solve a hard problem by breaking it into smaller, overlapping subproblems and solving each of those exactly once, storing the answer in a table so you never recompute it.
The payoff is enormous. A naive recursive Fibonacci makes ~1.5 million calls for n = 30. The DP version does 31 writes. This course shows you that gap, visually, on every lesson.
The Four Questions
Ask these before writing code. They turn DP from a collection of formulas into a repeatable problem-solving process.
1. Define the state
What does one entry mean? Say it in a complete sentence before using symbols. For example: dp[i] is the number of ways to reach stair i.
2. Derive the recurrence
What final decision could produce this state? Turn each possible decision into a smaller subproblem, then combine their answers.
3. Set bases and order
Which smallest states already have known answers? Which dependencies must be solved before each new state can be calculated?
4. Choose the execution
Use memoization to solve needed states top-down, or tabulation to fill them bottom-up. The state, base cases, and recurrence stay the same.
Your checkpoint: explain all four in plain language before you code. If one answer is unclear, the DP design is not finished.
Why this course is different
- Scrub any direction.
Step backward through a DP table and every cell, arrow, and code highlight stays consistent. The timeline is reversible by construction, not by special-casing.
- Change the input, instantly.
Drag n from 1 to 12 and the trace rebuilds live. See how the table, the dependency graph, and the operation count all scale, not just the final answer.
- Read the code alongside the table.
Every animated step highlights the exact line of source it executes. The visualization is the algorithm; there is no hidden logic.
Lessons
Four lessons, six beats each. Take them in order: every lesson reuses the previous one's derivation and changes exactly one thing about it: first how the buckets combine, then how many buckets there are, then how many numbers it takes to name a state.
Problem Set
78 problems, grouped by how much they ask of you. Do a lesson first, then come here: each problem gives you the statement, waits while you answer the four questions yourself, and only then shows you the recurrence and fills the table.
Basic Problems17
Easy Problems14
Medium Problems26
Hard Problems15
DP on Trees2
Advanced Concepts4
Breakdowns are being written family by family. Every problem's statement is here now; the animated tables land per batch.