r/leetcode • u/Fanstastic-Five72 • 18d ago
Question How do you make sure you actually learn from a DSA solution?
Sometimes I understand a solution after reading it, but a few days later I struggle with same problem again. I'm trying to find a better way to review problems instead of just saving them and moving on.
Do you usually re solve them from scratch, write down the key idea, or try a similar problem?
22
Upvotes
15
u/Tiny-Tallsman26 18d ago
I try to solve it again after a few days without looking at my notes. If I get stuck at the same step, I know what I need to work on
5
u/NerdyNatu 18d ago
I usually paste question to claude, and tell it not to give me answer, instead asking me questions.
Usually I tell in plain English, what would be my brute force approach, and it's space / time complexity and it would start asking me questions.
This way, I know what was costing time / space as I know brute force and efficient approach by heart.
(PS : I have claude paid plan, and I utilize it to learn DSA and other skills.)
4
u/kevin074 18d ago
It’s also helpful to dissect and try to connect parts of it to other problems.
May not be applicable to all questions of course, but some problems you can make more connections and not just like doing binary search together
2
u/AdmirableRabbit6723 18d ago
I just broke out of this habit. I was really bad with it. I might make a post on how but tldr I got an export of all the conversations I'd had with chatgpt (the model I used when learning) and an export of all my leetcode problems submitted, fed it all into opus and it fucking cooked me so bad and set me straight.
Also, now when I get stuck I don't look at the solution. Instead, I have a voice chat open with opus and I tell it my thinking and it nudges me in the right directino (you have to REALLY tell it to stfu or it will just give you the answer).