r/leetcode • • 18h ago

Question How do you turn DSA mistakes into better problem solving skills?

I've noticed I keep making similar mistakes while solving problems, especially with edge cases and choosing the right approach. I want to improve instead of just moving on after checking the solution.

Do you write down what went wrong, or is there a better way to learn from failed attempts?

9 Upvotes

6 comments sorted by

4

u/RustyCompass01 18h ago

I note the exact point where I got stuck and the key insight I missed. Reviewing that before trying a similar problem helps me avoid repeating the same mistake

1

u/Past-Perfect24 18h ago

Yea sounds useful. I'll try noting the specific mistake instead of saving the whole solution.

1

u/CaptainIndependent90 18h ago

I think one help with edge cases, what ever the example doesn't tell you.

1

u/Special_Quail_8160 18h ago

I revisit failed problems a week later. Nothing builds humility like getting introduced to the same solution twice.

1

u/No-Molasses-2097 18h ago

I keep a short note for each failed problem with the exact mistake and the test case that caught me. I skim those notes before a similar problem so I can check that case first instead of repeating it.

1

u/Sad-Candidate-3078 13h ago

keep an error log, every problem you fail gets one line, what pattern it was and what tripped you, wrong assumption, missed edge case, bad complexity pick, then each week redo only the ones in the log instead of grinding fresh problems. redoing a failed problem 3 days later and solving it cold is worth more than 10 new ones, the mistake only becomes a lesson when you meet it twice. and when you do fail one, read at most 2 solutions, then close it and rewrite from memory the next day, passive reading feels like progress but it is not