Dynamic Programming
Solve every subproblem once, then let the table do the work.
Dynamic Programming progress0 / 10
- What Is Dynamic Programming?Solve each overlapping subproblem once, then reuse the answer.5m
- Top-Down vs Bottom-UpOne recurrence, two directions: recurse and cache, or fill a table.5m
- Climbing StairsWays to reach step n = ways to n-1 plus ways to n-2.4m
- House RobberTake this one and skip its neighbour, or skip it and keep the best.5m
- Coin ChangeFewest pieces to hit a target, one amount at a time.6m
- Longest Common SubsequenceMatch the two ends, or drop a character from one side.6m
- 0/1 KnapsackEach item is all or nothing, so try both and keep the better.6m
- Edit DistanceInsert, delete, or replace — count the cheapest route.6m
- Longest Increasing SubsequenceEvery element asks which smaller one it can extend.6m
- DP on GridsEach cell's answer comes from the cells above and to its left.6m