60 minutes · mock day · dynamic programming
Tonight's goal: solve one 1-D DP problem, one 2-D/two-strings DP problem, and one free-choice DP problem under a strict timer.
Use the mock-day process: speak first, code honestly, compare after the timer.
Pick one from each row. If choice takes more than 60 seconds, use the first link in that row.
| Slot | Choose one problem | Pattern name |
|---|---|---|
| 1-D DP | House Robber / Climbing Stairs / Decode Ways | DP II: take it or skip it / DP I: the four questions / DP VIII: Counting With Constraints |
| 2-D/two-strings | Longest Common Subsequence / Edit Distance | DP VI: two strings, one grid / DP VII: edit distance |
| Free choice | Coin Change / Longest Increasing Subsequence / Partition Equal Subset Sum / Word Break / Burst Balloons | DP III: fewest coins / DP IV: longest increasing subsequence / DP V: 0/1 knapsack / DP IX: Segmentable Prefixes / DP X: interval DP |
For every selected problem, say these four answers aloud before coding: what the state means, how it comes from smaller states, the base case, and where the final answer lives.
1. Before coding any DP problem, which checklist must be spoken?
2. A current item can be used or skipped. Which phrase matches House Robber?
3. In Coin Change, what should dp[amount] store?
4. In LIS, what does dp[i] mean?
5. Two strings, current characters match. Which move is the LCS invariant?
6. Burst Balloons feels tangled because neighbors change. Which choice untangles the interval?
| Pass tonight if | Failure path |
|---|---|
| You attempted all three timed slots, spoke the four DP answers before each problem, and got at least two problems accepted or clearly correct on sample tests. | For any failed problem, write WA: <root cause>, add that exact problem to the next revision list, and re-solve it from a blank file with no hints. |
| If a solution failed, you can still explain which answer broke: state, transition, base case, or answer location. | If you cannot name the broken answer, compare after the timer and write the missing invariant as the first revision note. |