Topic 11 / 16
Dynamic Programming
HardOptimization~10 days
Very hard
progress0 / 19 solved
Cache subproblem results to avoid redundant computation. Recognize overlapping subproblems.
โ ๏ธ
Why this topic is hard
DP is hard for three reasons: (1) Recognizing that DP applies at all โ the problem must have overlapping subproblems and optimal substructure. (2) Defining what dp[i] means โ this definition IS the solution. Get it wrong and nothing works. (3) Getting the recurrence relation right โ this requires understanding how the optimal answer to a big problem relates to answers of smaller problems. The good news: there are only ~5 DP patterns that cover 90% of interview problems.
Prerequisites
Progress is saved on this device