I'll be honest — for the first two months I was doing this completely wrong. I'd look at a DP problem, spend 10 minutes on it, give up, read the solution, go "oh that makes sense," and move on. Rinse and repeat. I probably "solved" 60+ problems this way and retained maybe 5% of it.
The turning point was when I failed a Meta screen on a problem I had literally solved the week before. Same exact problem, different variable names. My brain was pattern-matching to the code, not to the underlying idea. That stung.
What actually helped me was forcing myself to answer one question before touching the keyboard: "what decision am I making at each step, and what do I need to remember to make the next decision?" That's it. That's the whole framework. If you can answer that in plain English, writing the recurrence becomes almost mechanical.
For example — coin change. The decision is "do I use this coin or skip it?" What I need to remember is "what's the minimum coins needed to make amount X?" So my state is just dp[amount]. Everything else falls out from there. I stopped needing to memorize whether it's dp[i-1][j] or dp[i][j-coin] because I could reconstruct it from first principles.
Another thing that helped: I stopped using the "accepted" tab as a success metric. Started timing how long it took me to explain my solution out loud to nobody. If I couldn't do that in under 2 minutes without looking at the code, I didn't really understand it.
Currently at ~180 problems, about 65% med/hard, and DP problems genuinely feel like the most fun category now. Never thought I'd type that sentence.
Curious if anyone else had a similar "oh" moment with DP, or a completely different approach that worked for them. Would love to hear what made it click.