1
AnonymousAnon
wrote out my dp problems in plain english before touching code and stopped writing solutions that technically worked but I couldn't explain
#dsa#interview-prep#learning
Used to jump straight to code on DP problems and sometimes get lucky with a working solution I couldn't actually explain if asked. Forcing myself to write the recurrence in a plain sentence first, 'the answer at i depends on the best of these two prior states,' slowed me down but fixed that thing where I pass the test cases and fail the follow-up questions.
1 comment
- 0
AnonymousAnon Been meaning to try this. My problem is usually the opposite, I can explain the idea fine out loud but the implementation falls apart the second I start typing.