Dynamic Programming

Solve each subproblem once, write it down, and hard problems collapse into loops.

5 lessons · ~52 min · free

By the end you can

  1. The same problem, solved again9 minNaive Fibonacci's call tree, counted: where the exponential blowup lives and what a cache does to it.
  2. From recursion to a loop11 minClimbing stairs four ways: plain recursion, memo, bottom-up table, two variables.
  3. Take it or skip it11 minHouse robber: deriving a recurrence from the last decision, then filling the table.
  4. Minimums and unlimited choices12 minCoin change: min instead of count, reusable choices, and infinity as "not reachable yet".
  5. Spotting DP problems9 minCount-ways and min-cost cues, DP vs greedy vs backtracking, and the 1-D checklist.

The account is free and so is every lesson. It unlocks the courses and saves your progress.

Practice it after

The final lesson links here too: real interview questions that test this pattern, in an editor with execution and AI feedback.