Build dynamic programming skills through basic states before grids, subsequences, strings, stocks and more involved transitions.
Log in/Sign up to track your progress
Striver’s Dynamic Programming Sheet contains 52 coding questions. It retains the original 50-question selection and adds Frog jump with K distances and Best time to buy and sell stock from the source curriculum. These exercises belong beside their related one-dimensional and stock questions, with Introduction to DP available before the coding groups.
This sheet contains 50 dynamic programming problems selected from existing takeUforward resources, with A2Z as the main source. The sections progress from short sequences and grids to subsets, strings, stock decisions, increasing subsequences and interval choices. That order helps you learn how states change before several conditions appear together.
Begin each attempt with the choices and a correct recursive definition. Then look for repeated states and decide how to store their answers. Memoization, tabulation and space optimization become easier to understand when they follow a clear recurrence instead of appearing as unrelated code templates.
The one-dimensional questions make state, previous results and transition choices visible before grids and subsequences introduce additional conditions. String and stock questions use states that answer different remaining-work questions. Partition and other advanced tasks add a larger set of choices; the required output still determines what each stored result means.
The existing introduction explains the basic DP idea. Know recursion, arrays, loops and function return values first, then distinguish a recursive state from the storage used to reuse its result. Use the Recursion foundations when call flow or a base case is still unclear.
Know functions, recursion, arrays and basic complexity analysis. Be able to explain when a recursive call stops and what it returns. For grid and string questions, practise translating an input position into a valid index before adding a table.
Do not use a table only because a question looks difficult. First identify the repeated task. For a state with several parameters, explain why those parameters completely describe the remaining work. If a later choice depends on information that the state forgot, caching its answer will not fix the definition.