25 DP Problems To Revise Before Interviews

I've posted many complete resource guides recently - covering patterns, variations, and tons of problems for each topic. They're great for learning from scratch or extensive practice, but if your interview is already scheduled, covering 50-70 problems per topic just isn't realistic.
That's why I'm creating focused problem lists for each topic, just 10-25 essential problems that cover the complete breadth of what you need.
Starting today with DP: 25 carefully selected problems covering every major DP pattern for interviews. If you're interviewing at Google or other DSA-heavy companies, you might need extra practice, but for most tech interviews, this list is a solid foundation.


The 25 Essential Problems

1. Climbing Stairs - LeetCode 70

  • Pattern: Basic DP, Fibonacci recurrence
  • Why: Foundation of all DP, teaches recursion → memoization → tabulation

2. House Robber - LeetCode 198

  • Pattern: Include/Exclude decision
  • Why: Classic choice pattern, appears in many forms

3. House Robber II - LeetCode 213

  • Pattern: Circular array
  • Why: Teaches constraint handling

4. Decode Ways - LeetCode 91

  • Pattern: Count ways
  • Why: Common in interviews, multiple transitions

5. Jump Game II - LeetCode 45

  • Pattern: Minimum steps
  • Why: Optimization + greedy thinking

6. Unique Paths - LeetCode 62

  • Pattern: Basic 2D DP
  • Why: Foundation for all grid problems

7. Minimum Path Sum - LeetCode 64

  • Pattern: Cost optimization on grid
  • Why: Very common in interviews

8. Longest Common Subsequence - LeetCode 1143

  • Pattern: LCS (2D string DP)
  • Why: Foundation for all string comparison

9. Edit Distance - LeetCode 72

  • Pattern: String transformation
  • Why: Frequently asked, shows operations clearly

10. Partition Equal Subset Sum - LeetCode 416

  • Pattern: 0/1 Knapsack (subset sum)
  • Why: Foundation of knapsack, must know

11. Target Sum - LeetCode 494

  • Pattern: Count ways knapsack
  • Why: Shows knapsack in disguise

12. Coin Change - LeetCode 322

  • Pattern: Unbounded knapsack (minimize)
  • Why: Classic, very frequently asked

13. Coin Change II - LeetCode 518

  • Pattern: Unbounded knapsack (count ways)
  • Why: Complements Coin Change, different objective

14. Ones and Zeroes - LeetCode 474

  • Pattern: 2D knapsack
  • Why: Multiple constraints variation

15. Longest Increasing Subsequence - LeetCode 300

  • Pattern: LIS (know both O(n²) and O(n log n))
  • Why: Must-know, appears in many variations

16. Longest Palindromic Substring - LeetCode 5

  • Pattern: Palindrome problems
  • Why: Classic problem, multiple approaches

17. Palindromic Substrings - LeetCode 647

  • Pattern: Count palindromes
  • Why: Counting variant, builds on problem 16

18. Word Break - LeetCode 139

  • Pattern: String partition
  • Why: Common pattern, dictionary-based DP

19. Best Time to Buy and Sell Stock - LeetCode 121

  • Pattern: One transaction
  • Why: Foundation, simple but important

20. Best Time to Buy and Sell Stock II - LeetCode 122

  • Pattern: Unlimited transactions
  • Why: Introduces state concept

21. Best Time to Buy and Sell Stock with Cooldown - LeetCode 309

  • Pattern: State machine
  • Why: Teaches state transitions clearly

22. Best Time to Buy and Sell Stock IV - LeetCode 188

  • Pattern: K transactions (generalizes all stocks)
  • Why: Master this, master all stock problems

23. Unique Paths II - LeetCode 63

  • Pattern: Grid with obstacles
  • Why: Adds constraints to grid DP

24. Triangle - LeetCode 120

  • Pattern: Non-rectangular grid
  • Why: Variable width DP

25. Palindrome Partitioning II - LeetCode 132

  • Pattern: Partition DP
  • Why: Advanced string DP, commonly asked

Final Advice

  1. Quality over quantity. 25 deeply understood problems > 100 half-understood problems.

  2. Focus on patterns. When you solve problem 10 (Partition Equal Subset Sum), you're not learning one problem. You're learning the subset sum pattern that appears in dozens of problems.

  3. Code, don't read. Reading solutions feels productive but doesn't work. You need to actually code these.

  4. Time yourself. In interviews, you'll have 30-40 minutes. Practice under time pressure.

  5. Revise. Solve each problem twice - once now, once 3 days later.


Check out my posts which may help you in your preparation :

  1. Complete DP Problems & Resources Guide
  2. Complete Graph Problems & Resources Guide
  3. 13 DP Patterns for Interview Preparation
  4. 10 Dijkstra Variations for Interview Preparation
  5. Understanding Time Complexity: The 10^8 Operations Rule
  6. 10 Essential Design Problems for DSA Interviews
  7. Essential CS Fundamental Topics For Interviews
  8. Essential Graph Patterns for Coding Interviews
  9. Essential String Patterns for Coding Interviews
  10. 15 Essential DSA Patterns for Tech Interviews
  11. The 10 Variations of Two Pointers for Interview Preparation

These 25 problems are your DP foundation. Master them, and DP becomes one of your strengths instead of a weakness.

Now stop reading. Open problem 1. Start coding.

Good luck! 🚀

Comments (6)