Advanced
Dynamic Programming
Turn exponential recursion into fast code by solving each subproblem once. Learn the state, transition, base case, answer recipe, then apply it to 1D, grid, two-string and knapsack problems.
0 of 3 lessons complete, 0 of 9 problems solved
Coursework
42 min
From Recursion to DP
Take a slow recursive solution and make it fast: memoize it, turn it into a table, then shrink the table.
1D DP Patterns
Three shapes that cover most 1D problems: take or skip, unbounded choices, and best-ending-here (LIS).
2D DP: Grids, Strings, Knapsack
When one index isn't enough: grid paths, comparing two strings, 0/1 knapsack, and rolling rows to save space.
Practice ladder
Start with the first problem, then work toward the harder variations. Run examples before submitting against all tests.
Next unit: Greedy & Intervals