Topic
Dynamic Programming interview problems
States, transitions and memoization on sequences and grids. 137 original problems, each with hidden test cases you can run in the browser.
5 easy96 medium36 hard
Showing 121–137 of 137 results
Tests dynamic programming with coordinate compression and Fenwick trees to efficiently compute optimal bitonic subsequences.
Auto-gradeddynamic-programmingfenwick-treecoordinate-compressionbitonic-sequenceTests grid DP with an extra state dimension: navigate an N×M grid from top-left to bottom-right tracking remaining fuel, refueling at marked cells, minimizing total toll cost.
Auto-gradeddynamic programminggridstatememoizationTests dynamic programming with number theory constraints, combining sequential traversal with prime-offset jumps that depend on target cell properties.
Auto-gradeddynamic-programmingnumber-theoryarraysTests dynamic programming on sparse integers and hash map frequency counting to find the optimal subset when adjacent values conflict.
Auto-gradedhash-mapsortinghouse-robber-variantTests dynamic programming on strings to find the longest subsequence that is identical when reversed.
Auto-gradeddynamic-programmingstringssubsequencesTests string DP by computing the minimum total cost to convert a source string into a target string using per-character insert, delete, and replace operations with custom costs.
Auto-gradeddynamic programmingstringedit distanceTests whether a candidate can implement both unbounded and 0/1 knapsack DP to find the smallest number of tokens that sum exactly to a target.
Auto-gradeddynamic-programmingknapsackbottom-up-dpTests whether a candidate can apply bottom-up DP on a 2-D grid to count reachable paths from top-left to bottom-right while respecting blocked cells.
Auto-gradeddynamic programminggridpathsTests dynamic programming on interval optimization, optimal substructure, and avoiding greedy pitfalls in matrix multiplication ordering.
Auto-gradeddynamic-programmingoptimizationrecursionTests interval DP by finding the minimum total cost to merge an array of stone piles into one, where merging any contiguous segment costs the sum of that segment.
Auto-gradeddynamic programminginterval DPmemoizationTests string DP by computing the minimum total movement cost to type a target string on a circular letter wheel, starting from a given letter.
Auto-gradeddynamic programmingstring DPgreedyTests grid-path DP with a carried state (fatigue level) that penalizes consecutive moves in the same direction, requiring careful state-space design and memoization.
Auto-gradeddynamic programminggridmemoizationstate machineTests the 0/1 knapsack variant where you allocate a fixed energy budget across museum exhibits with costs and values, but some exhibits are only accessible after visiting a prerequisite.
Auto-gradeddynamic programmingknapsackprerequisitesTests bitmask DP on small n by finding the minimum total travel cost to visit every booth at a fair, starting and ending at the entrance.
Auto-gradeddynamic programmingbitmask DPgraphsTests grid-path DP where the traveler must collect keys to unlock doors, requiring bitmask state to track which keys have been picked up.
Auto-gradeddynamic programmingbitmaskgridBFS/DPTests whether a candidate can apply 0/1 knapsack DP to determine the maximum total value achievable by selecting items that collectively use exactly K distinct item types within a weight budget.
Auto-gradeddynamic programmingknapsackmemoizationTests bitmask DP over a small set of checkpoints to find the minimum-cost path that visits every checkpoint exactly once, starting and ending at a fixed depot.
Auto-gradeddynamic programmingbitmask DPgraphs