practice a little every day — you've got this ♡
Dynamic Programming Interview Problems
Practice 5965 original coding, SQL, system design, machine learning and behavioral problems across 15 topics. Coding and SQL problems run against hidden test cases right in your browser; every problem has hints and a worked solution, free.
- 5965
- Problems
- 2208
- Auto-graded
- 15
- Topics
- 271
- Added today
Showing 1–17 of 17 results
- Dynamic ProgrammingMediumModel answerPrune Minimum Nodes from Tree to Satisfy Height Budget
Determine the minimal set of non-root node deletions required to trim a multi-child tree's height down to a target limit under node-promotion rules.
Dynamic Programmingtrees-graphsdynamic-programmingtree-dp - Dynamic ProgrammingHardModel answerMaximize Allocation Across Server Pools with Migration Limits
Aggregate daily resource usages and calculate optimal allocations under unrestricted and migration-bounded pool selection constraints using dynamic programming.
Dynamic Programmingarraysdynamic-programminggreedy-intervals - Dynamic ProgrammingMediumModel answer0/1 to Bounded Knapsack Optimization and Traceback
Solve the 0/1 knapsack problem with optimal item selection, optimize its space complexity, and extend the solution to bounded knapsacks efficiently.
Dynamic Programmingdynamic-programmingarrayssliding-windowknapsack - Dynamic ProgrammingMediumModel answerCheapest Fence Painting With No Matching Neighbors
Color a row of posts from a cost table so no two neighbors match, minimizing total cost, using memoized recursion and a space-optimized bottom-up DP, and recover one optimal coloring.
Dynamic Programmingdynamic-programmingmemoizationspace-optimizationreconstruction - Dynamic ProgrammingHardModel answerIdentify Compound Words in a Dictionary
Find all strings in a list that can be constructed by concatenating two or more smaller strings from the same list.
Dynamic Programmingstringsdynamic-programmingtriehash-table - Dynamic ProgrammingMediumModel answerLeft-to-Right Plus/Times Expression from a Subsequence
Decide whether a subsequence of positive integers, joined by + and * and evaluated strictly left to right, can equal a target, and produce one valid expression.
Dynamic Programmingdynamic-programmingbacktrackingpruningreverse-search - Dynamic ProgrammingHardModel answerBest Self-Matching Count After Removing Array Elements
Delete any elements from an array so the most remaining values equal their new 1-based position. Reduce it to a longest-chain problem solved in O(n log n).
Dynamic Programmingdynamic-programminglongest-increasing-subsequencebinary-searchsubsequence - Dynamic ProgrammingMediumModel answerAutonomous Drone Navigation in Dynamic Canyons
Design a deterministic per-tick controller for a thruster-driven drone navigating procedurally generated obstacle canyons using lookahead simulation.
Dynamic Programmingdynamic-programminglookahead-searchsimulationmemoization - Dynamic ProgrammingMediumModel answerFewest Transfers to Clear Everyone's Net Balance
Given payer/payee/amount triples, compute net balances and return an optimal (minimum-count) set of settlement transfers that zeroes everyone out.
Dynamic Programmingbitmask-dpgreedysubset-sumaccounting - Dynamic ProgrammingMediumModel answerStock Trading Profit with Transaction Limits and Fees
Maximize stock trading profit given a cap on total transactions and a per-sale fee, using a unified DP state machine.
Dynamic Programmingdynamic-programmingstate-machinegreedy - Dynamic ProgrammingMediumModel answerDigit-Sum Frequency Peaks
Count how many digit-sum values tie for the most occurrences among integers 1 through n.
Dynamic Programmingdigit-dpcombinatoricsmath - Dynamic ProgrammingHardModel answerDAG Schedule Analysis and Windowed Checkpoint DP
Compute critical-path latency and peak concurrency for a task DAG, then find minimum-cost checkpoint placement under a sliding-window coverage constraint.
Dynamic Programmingdagtopological-sortsliding-windowdynamic-programming - Dynamic ProgrammingHardModel answerTwo-Station Job Scheduling with Setups and a Downtime Window
Assign and sequence three jobs across two parallel stations to minimize makespan, handling sequence-dependent changeovers, a precedence constraint, and a station blackout period.
Dynamic Programmingschedulingcombinatorial-optimizationbranch-and-boundNP-hardness - Dynamic ProgrammingMediumModel answerMaximum Valid-Partition Block Count for Every Prefix
For each prefix of a string, find the maximum number of contiguous blocks it can be split into where every character in a block shares the same frequency.
Dynamic Programmingdynamic programmingstringsfrequency countingprefix processing - Dynamic ProgrammingMediumModel answer0/1 Knapsack: Space-Efficient DP with Item Recovery
Implement a weight-capacity optimizer returning max value and an exact item set, using O(W) space DP, then extend to unbounded and bounded variants.
Dynamic Programmingdynamic-programmingknapsackreconstructionoptimization - Dynamic ProgrammingMediumModel answerFlappy Bird Auto-Pilot with Lookahead Planning
Design a physics-based agent that decides when to jump by projecting future trajectories and checking collision-free paths through upcoming obstacles.
Dynamic Programminggame-physicssimulationtrajectory-planning - Dynamic ProgrammingHardModel answerBalance Mixed Bracket Types with Minimum Deletions
Delete the fewest bracket characters to make all remaining brackets properly matched and nested, keeping all non-bracket characters intact.
Dynamic Programmingdynamic-programmingstringsinterval-dp