5 lessons
Dynamic Programming
Recognise overlapping subproblems, cache them, and turn exponential recursion into linear time.
1D DP Patterns: House Robber and Friends
A family of problems where the decision at each step is small, but the pattern quietly powers half the DP questions you will ever see.
Grid DP and the Knapsack Family
Move from a 1D line of decisions to a 2D table, and meet the single most reused DP shape in interviews.
Longest Increasing Subsequence
One problem, two solutions — a clean O(n²) DP and a clever O(n log n) upgrade using binary search where you would least expect it.
String DP: LCS, Edit Distance and Palindromes
Two strings, a 2D table, and the recurrence pattern that solves comparison, transformation and palindrome problems alike.