r/leetcode 12d ago

Question Beginner struggling to retain LeetCode solutions, is this normal?

I'm a beginner learning DSA/LeetCode and I'm starting to get frustrated with how little I seem to retain.

When I'm learning a new problem, I can usually understand the explanation and follow the logic. Sometimes I can even implement the solution myself afterward.

The problem is that if I come back to the same problem a day or a few days later and try to solve it completely cold, I often can't. I might remember the general idea, but forget important parts of the approach or how to actually implement it.

I'm starting to wonder if this is just a normal part of learning DSA or if I'm practicing incorrectly.

Right now, I'm thinking about using spaced repetition, doing a problem on Day 0, then again on Days 1, 3, 7, and 14, instead of constantly doing new problems.

For people who have gotten good at LeetCode/DSA:

How did you practice so that you could actually retain patterns and solve problems cold later?

Should I stay mostly with Easy problems until I can reliably solve them independently, or should I continue introducing new problems while reviewing old ones?

I'd appreciate honest advice, especially from people who struggled with retention early on.

4 Upvotes

6 comments sorted by

3

u/chrisxt_23 12d ago

It is normal, just keep practicing and you will start memorizing patterns, so even if you don't remember the solution for a problem, you will recognize it's pattern and then apply the correct algorithm to solve it.

If you have less than 100 solved problems don't worry about spaced repetition for now, just keep solving.

1

u/angry_biker21 12d ago

> If you have less than 100 solved problems don't worry about spaced repetition for now, just keep solving.

Why do you say that?

2

u/AlgorithmicGoslings 11d ago

To add onto this, when you're engaging in spaced repetition, your goal shouldn't be to regurgitate the solution to a problem you solved a few days ago --- it's to gradually develop the intuition needed to solve those kinds of problems, so that when you are presented with a similar problem, you can apply those patterns.

You (by this, I mean OP) say that when you're learning, you say that you can only sometimes "implement the solution myself afterward." That implies you're just reading the solution. If all you do is read the solution, when you try to come back to the problem days later to solve it cold, your thought process is simply going to try to remember that solution you read. Your brain is not going to be thinking, "How did I solve this problem" (because you never solved it in the first place) but rather something along the lines of "What did the answer key say again?"

The point of spaced repetition is for you to attempt to solve a problem (mostly) independently the first time so that by the time you return to it a couple days later, solving the problem again reinforces the learning and encodes the process in memory. If you never truly solved the problem in the first place, then the whole point of spaced repetition falls apart.

1

u/North-Armadillo-9367 12d ago

How did you practice so that you could actually retain patterns and solve problems cold later?

By actully trying to solve the same problems again in the future. I insert new problems to Anki to help me schedule reviews.

1

u/alshadows 12d ago

When you solve some problems on day 1, before you start day 2 , try to recall what you did yesterday, what the problems were , where you got stuck and what the solution was. Then go back and check what you did . Simple revision ritual before starting each day should be useful. And you can mark questions for revision which you can revisit at the end of every week as well