Why DP problems are different
Unlike most patterns where the template is fixed, DP requires you to invent the state definition for each problem. That is why it feels harder — there is no single template. But there ARE recurring archetypes. Once you recognize "this is a 1D knapsack variant" or "this is an LCS-style 2D problem", you can solve any variation. These 30 problems cover every archetype that appears in interviews.
1D DP — Classic problems
These are the entry point. Climbing Stairs (LC 70) — the "hello world" of DP. House Robber (LC 198) — introduces the skip-or-take recurrence. Coin Change (LC 322) — unbounded knapsack archetype. Longest Increasing Subsequence (LC 300) — O(n²) DP or O(n log n) with patience sort. Word Break (LC 139) — string segmentation DP. Min Cost Climbing Stairs (LC 746). Jump Game (LC 55) and Jump Game II (LC 45).
2D DP — Grid and string problems
Unique Paths (LC 62) — grid DP warmup. Minimum Path Sum (LC 64). Longest Common Subsequence (LC 1143) — the foundation of diff algorithms. Edit Distance (LC 72) — one of the most common Google questions. Interleaving String (LC 97). Regular Expression Matching (LC 10) — hard but frequently asked at Google.
Knapsack variants
0/1 Knapsack — Partition Equal Subset Sum (LC 416). Unbounded Knapsack — Coin Change (LC 322), Coin Change II (LC 518). Target Sum (LC 494) — count subsets with given sum. Last Stone Weight II (LC 1049). These all reduce to the same template: dp[i] = can we achieve sum i using available items?
Tree and interval DP
Unique BSTs (LC 96) — Catalan number DP. Burst Balloons (LC 312) — interval DP, hard but canonical. Palindrome Partitioning II (LC 132). Matrix Chain Multiplication — classic interval DP pattern. For trees: House Robber III (LC 337) — tree DP where state is (rob this node, skip this node).
State machine DP
Best Time to Buy and Sell Stock series (LC 121, 122, 123, 188, 309) — the canonical state machine DP. States: holding, not holding, cooldown. Transitions model allowed actions. LC 123 (at most 2 transactions) and LC 188 (at most k transactions) are frequently asked at FAANG. These teach you to think of DP as a state machine, which generalizes to many other problems.