Top Dynamic Programming LeetCode Questions Asked in Microsoft Interviews
Dynamic Programming (DP) is one of the most important concepts tested in Microsoft software engineering interviews. Many interview problems require candidates to break complex problems into smaller subproblems and optimize solutions using techniques such as memoization, tabulation, and state transitions.
In this guide, we have compiled commonly asked Dynamic Programming problems from LeetCode that have appeared in Microsoft interviews. These problems help you understand important DP patterns such as knapsack, subsequence DP, grid-based DP, and optimization problems.
Practicing these questions will strengthen your ability to design efficient and optimized algorithms, which is a key skill evaluated during technical interviews.
Below is the curated list of Dynamic Programming questions frequently asked in Microsoft interviews.
| Sl.No | Question | Difficulty | Frequency | LeetCode Link |
|---|
| 1 | Trapping Rain Water | HARD | 85.90% | Solve |
| 2 | Longest Palindromic Substring | MEDIUM | 77.10% | Solve |
| 3 | Best Time to Buy and Sell Stock | EASY | 73.40% | Solve |
| 4 | Maximum Subarray | MEDIUM | 71.10% | Solve |
| 5 | Longest Increasing Subsequence | MEDIUM | 71.00% | Solve |
| 6 | Maximal Square | MEDIUM | 71.00% | Solve |
| 7 | Jump Game | MEDIUM | 69.80% | Solve |
| 8 | Climbing Stairs | EASY | 69.80% | Solve |
| 9 | Generate Parentheses | MEDIUM | 68.60% | Solve |
| 10 | Coin Change | MEDIUM | 68.40% | Solve |
| 11 | Word Break | MEDIUM | 60.60% | Solve |
| 12 | Jump Game II | MEDIUM | 59.10% | Solve |
| 13 | Unique Paths | MEDIUM | 56.90% | Solve |
| 14 | Regular Expression Matching | HARD | 56.10% | Solve |
| 15 | Pascal's Triangle | EASY | 55.40% | Solve |
| 16 | Word Break II | HARD | 53.30% | Solve |
| 17 | House Robber | MEDIUM | 53.00% | Solve |
| 18 | Longest Valid Parentheses | HARD | 48.70% | Solve |
| 19 | Palindromic Substrings | MEDIUM | 46.70% | Solve |
| 20 | Edit Distance | MEDIUM | 45.70% | Solve |
| 21 | Maximum Product Subarray | MEDIUM | 45.50% | Solve |
| 22 | Decode Ways | MEDIUM | 45.30% | Solve |
| 23 | Minimum Path Sum | MEDIUM | 44.30% | Solve |
| 24 | Wildcard Matching | HARD | 41.60% | Solve |
| 25 | Best Time to Buy and Sell Stock II | MEDIUM | 38.90% | Solve |
| 26 | Maximal Rectangle | HARD | 36.10% | Solve |
| 27 | Unique Paths II | MEDIUM | 35.30% | Solve |
| 28 | Unique Binary Search Trees II | MEDIUM | 35.30% | Solve |
| 29 | Binary Tree Maximum Path Sum | HARD | 30.70% | Solve |
| 30 | Interleaving String | MEDIUM | 28.10% | Solve |
| 31 | Unique Binary Search Trees | MEDIUM | 26.80% | Solve |
| 32 | Palindrome Partitioning | MEDIUM | 25.00% | Solve |
| 33 | Best Time to Buy and Sell Stock III | HARD | 17.70% | Solve |
| 34 | Paint House | MEDIUM | 5.00% | Solve |
| 35 | Number of Dice Rolls With Target Sum | MEDIUM | 1.72% | Solve |
| 36 | Largest BST Subtree | MEDIUM | 1.61% | Solve |
| 37 | Frog Jump | HARD | 1.56% | Solve |
| 38 | Coin Change 2 | MEDIUM | 1.49% | Solve |
| 39 | Triangle | MEDIUM | 1.48% | Solve |
| 40 | Cheapest Flights Within K Stops | MEDIUM | 1.38% | Solve |
| 41 | Longest Increasing Path in a Matrix | HARD | 1.34% | Solve |
| 42 | Longest Palindromic Subsequence | MEDIUM | 1.26% | Solve |
| 43 | Knight Probability in Chessboard | MEDIUM | 1.25% | Solve |
| 44 | Split Array With Same Average | HARD | 1.17% | Solve |
| 45 | Perfect Squares | MEDIUM | 0.99% | Solve |
| 46 | Palindrome Removal | HARD | 0.88% | Solve |
| 47 | Partition to K Equal Sum Subsets | MEDIUM | 0.86% | Solve |
| 48 | 4 Keys Keyboard | MEDIUM | 0.84% | Solve |
| 49 | Android Unlock Patterns | MEDIUM | 0.79% | Solve |
| 50 | Super Egg Drop | HARD | 0.76% | Solve |
You can also track your progress and practice these questions using our tool:
Track your progress with our Microsoft interview progress tracker
Related Articles