Dynamic Programming interview questions
332 dynamic programming problems tagged across recent interview reports. Drilled most heavily by amazon, google, and tiktok.
Dynamic Programming is the pattern behind 332 interview problems and dominates assessments at Amazon, Google, and TikTok. It's a method for solving optimization problems by breaking them into overlapping subproblems, storing results to avoid recomputation, and building up to the final answer. The pattern shows up everywhere: stock trading, string matching, matrix traversal, tree construction. Most candidates drill it late and hit it unprepared in the live OA. StealthCoder reads the problem and solves it invisible to the proctor, turning a panic moment into a clean submission.
Most-asked dynamic programming problems
Showing top 50 of 332 dynamic programming problems by # companies asking.
You can't drill every dynamic programming variant before the assessment. StealthCoder runs invisibly during screen share and solves whichever variant they throw at you. No browser extension. No detection signature. Made for the engineer who has done the work but might still blank with a webcam pointed at him.
Get StealthCoderDynamic Programming problems live in two worlds: memoization (top-down, recursive) and tabulation (bottom-up, iterative). The signature tell is when a naive recursive solution has exponential complexity because it recalculates the same state thousands of times. You'll recognize it in problems like Best Time to Buy and Sell Stock, Arithmetic Slices, and 01 Matrix. The drill order matters: start with 1D DP (linear sequences), move to 2D DP (grids and pairs), then tackle decision DP (when to buy, when to skip). Amazon and Goldman Sachs weight this pattern heavily. When you hit a DP variant in your live assessment that you haven't drilled, StealthCoder solves it in seconds while you paste and format.
Companies that hire most on dynamic programming
332 dynamic programming problems.
You won't drill them all. Pass anyway.
Dynamic Programming is one of the patterns interviews actually filter on. Memorizing every variant in a week is a fantasy. StealthCoder is the hedge: an AI overlay invisible during screen share. It reads the problem and surfaces a working solution in under 2 seconds, no matter which dynamic programming flavor lands in your live OA. Made for the engineer who has done the work but might still blank with a webcam pointed at him. Works on HackerRank, CodeSignal, CoderPad, and Karat.
Dynamic Programming interview FAQ
How many dynamic programming problems should I drill before an OA?+
With 332 problems tagged DP, you won't drill all of them. Target 20-30 core problems: 8-10 on 1D DP (stock, stairs, climbing), 8-10 on 2D DP (paths, matrix), 5-8 on decision/state DP. Focus on problems that feel unfamiliar each time you solve them.
Which company drills dynamic programming the hardest?+
Amazon asks 95 DP problems in their interview pool, more than any other company. Google, TikTok, and D.E. Shaw each ask 80-plus. If you're targeting these companies, DP fluency isn't optional.
How do I recognize a dynamic programming problem in an interview?+
Look for optimization (max, min, count ways), constraints that rule out brute force, and a state space you can define. If you write a recursive solution and realize you're solving the same subproblem twice, it's DP. Problems like Best Sightseeing Pair and Arithmetic Slices all fit this pattern.
Is dynamic programming the most important pattern for Amazon and Google?+
It's in the top tier. Amazon has 95 DP problems in their bank, but they also ask arrays, trees, and graphs. DP is the hardest to improvise on live, which is why it's critical to drill and why having a safety net matters.
Should I memorize DP solutions or understand the logic?+
Understand the logic. Memorizing code doesn't transfer to variants. You need to recognize the recurrence relation and state definition. Understanding why Best Time to Buy and Sell Stock uses dp[i] = max profit by day i trains you for the hard variant that shows up under time pressure.