Dynamic Programming
The hardest type: memoization is born from mastered recursion. Closes the course.
Lessons
- ✓01
Recognizing DP problems
Overlapping subproblems, memoization vs tabulation, and the states × cost complexity.
- ✓02
Pattern 1: 1D DP (the recurrence)
Building an answer from the previous ones — climbing stairs and the foundation of everything.
- ✓03
Pattern 2: Include or exclude
At each item, decide to take or skip — house robber and the boundary between greedy and DP.
- ✓04
Pattern 3: Knapsack (coin change)
Composing a target from reusable items — coin change and the unbounded knapsack.
- ✓05
Pattern 4: Grid DP
Filling a 2D table where each cell depends on its neighbors — unique paths.
- ✓06
Pattern 5: DP on sequences and strings
Comparing two sequences in a 2D table — LCS, and the family of string DP.
- ✓07
Synthesis: which pattern to use?
The section's (and course's) decision tree and the general quiz before the final exam.
1 easy + 1 medium + 1 hard — unseen problems
With hidden test cases, just like the real LeetCode. This is where you confirm you can leave the section solving any problem of the topic.