Dynamic Programming DSA Problems

557 dynamic programming problems for coding interviews and campus placements, with hints and company tags. Below are the first 100 of 557: 13 easy, 0 medium and 87 hard. Practise them free on InternHack and track what you have solved.

Dynamic Programming problems, easiest first

  1. Best Time to Buy and Sell Stock (Easy)
  2. Climbing Stairs (Easy)
  3. Count Numbers With Unique Digits II (Easy)
  4. Counting Bits (Easy)
  5. Divisor Game (Easy)
  6. Fibonacci Number (Easy)
  7. Is Subsequence (Easy)
  8. Longest Unequal Adjacent Groups Subsequence I (Easy)
  9. Maximum Repeating Substring (Easy)
  10. Min Cost Climbing Stairs (Easy)
  11. N-th Tribonacci Number (Easy)
  12. Pascal's Triangle (Easy)
  13. Pascal's Triangle II (Easy)
  14. Check if There Is a Valid Parentheses String Path (Hard)
  15. Allocate Mailboxes (Hard)
  16. Arithmetic Slices II - Subsequence (Hard)
  17. Best Time to Buy and Sell Stock III (Hard)
  18. Best Time to Buy and Sell Stock IV (Hard)
  19. Binary Tree Cameras (Hard)
  20. Binary Tree Maximum Path Sum (Hard)
  21. Build Array Where You Can Find The Maximum Exactly K Comparisons (Hard)
  22. Burst Balloons (Hard)
  23. Cat and Mouse (Hard)
  24. Cat and Mouse II (Hard)
  25. Check if an Original String Exists Given Two Encoded Strings (Hard)
  26. Cherry Pickup (Hard)
  27. Cherry Pickup II (Hard)
  28. Choose Numbers From Two Arrays in Range (Hard)
  29. Closest Subsequence Sum (Hard)
  30. Coin Path (Hard)
  31. Concatenated Divisibility (Hard)
  32. Concatenated Words (Hard)
  33. Constrained Subsequence Sum (Hard)
  34. Construct String with Minimum Cost (Hard)
  35. Count All Valid Pickup and Delivery Options (Hard)
  36. Count Different Palindromic Subsequences (Hard)
  37. Count Fertile Pyramids in a Land (Hard)
  38. Count Increasing Quadruplets (Hard)
  39. Count K-Reducible Numbers Less Than N (Hard)
  40. Count Number of Balanced Permutations (Hard)
  41. Count Number of Special Subsequences (Hard)
  42. Count of Integers (Hard)
  43. Count Palindromic Subsequences (Hard)
  44. Count Paths That Can Form a Palindrome in a Tree (Hard)
  45. Count Routes to Climb a Rectangular Grid (Hard)
  46. Count Stepping Numbers in Range (Hard)
  47. Count the Number of Ideal Arrays (Hard)
  48. Count the Number of Inversions (Hard)
  49. Count the Number of Powerful Integers (Hard)
  50. Count The Number of Winning Sequences (Hard)
  51. Count The Repetitions (Hard)
  52. Count Unique Characters of All Substrings of a Given String (Hard)
  53. Count Valid Paths in a Tree (Hard)
  54. Count Visited Nodes in a Directed Graph (Hard)
  55. Count Vowels Permutation (Hard)
  56. Count Ways to Build Rooms in an Ant Colony (Hard)
  57. Count Ways to Distribute Candies (Hard)
  58. Count Ways to Make Array With Product (Hard)
  59. Decode Ways II (Hard)
  60. Delete Columns to Make Sorted III (Hard)
  61. Delivering Boxes from Storage to Ports (Hard)
  62. Dice Roll Simulation (Hard)
  63. Difference Between Maximum and Minimum Price Sum (Hard)
  64. Digit Count in Range (Hard)
  65. Distinct Subsequences (Hard)
  66. Distinct Subsequences II (Hard)
  67. Distribute Repeating Integers (Hard)
  68. Dungeon Game (Hard)
  69. Encode String with Shortest Length (Hard)
  70. Find All Good Strings (Hard)
  71. Find All Possible Stable Binary Arrays II (Hard)
  72. Find Maximum Non-decreasing Array Length (Hard)
  73. Find Minimum Time to Finish All Jobs (Hard)
  74. Find Number of Coins to Place in Tree Nodes (Hard)
  75. Find Number of Ways to Reach the K-th Stair (Hard)
  76. Find Sum of Array Product of Magical Sequences (Hard)
  77. Find the Count of Monotonic Pairs I (Hard)
  78. Find the Count of Monotonic Pairs II (Hard)
  79. Find the Largest Palindrome Divisible by K (Hard)
  80. Find the Maximum Length of a Good Subsequence II (Hard)
  81. Find the Maximum Number of Fruits Collected (Hard)
  82. Find the Maximum Sequence Value of Array (Hard)
  83. Find the Maximum Sum of Node Values (Hard)
  84. Find the Minimum Cost Array Permutation (Hard)
  85. Find the Number of Possible Ways for an Event (Hard)
  86. Find the Number of Subsequences With Equal GCD (Hard)
  87. Find the Original Typed String II (Hard)
  88. Find the Shortest Superstring (Hard)
  89. Find the String with LCP (Hard)
  90. Find the Sum of Subsequence Powers (Hard)
  91. Find the Sum of the Power of All Subsequences (Hard)
  92. Find Weighted Median Node in Tree (Hard)
  93. Form Largest Integer With Digits That Add up to Target (Hard)
  94. Freedom Trail (Hard)
  95. Frog Jump (Hard)
  96. Get the Maximum Score (Hard)
  97. Handshakes That Don't Cross (Hard)
  98. Jump Game V (Hard)
  99. K Inverse Pairs Array (Hard)
  100. Kth Ancestor of a Tree Node (Hard)

Companies that ask dynamic programming problems

Before your interview

Most resumes are filtered by software before a recruiter reads them. Check your resume ATS score free, no signup needed.

Other DSA topics