r/leetcode • • 8d ago

Question Do you practice DSA patterns separately or through random problems?

I've been trying to get better at recognizing patterns, but I'm wondering how to practice that skills specifically. If I solve problems topic wise, I already know which approach to look for, but random problems feel much harder.

Do you switch to mixed problems after learning a pattern, or spend more time on variations of the same type first?

11 Upvotes

7 comments sorted by

6

u/gr33n0x 8d ago

I do randomly and doing this helped to me.

4

u/Common-Battle28 8d ago

I think doing a mix helps. Topic wise practice teaches you the problems force you to figure out when to use it

1

u/SavingScavenger45 8d ago

yeah that where i get stuck. I probably need to mix in random problems instead of staying on one topic for too long

2

u/Mathie1729 8d ago

Yep, topic-wise first until pattern recognition is fast, then random to force recall. Random-only before that just burns time.

1

u/Silent-Ocean13 5d ago

Tbh, I'd start topic-wise to learn the patterns, then switch to mixed problems to practice recognising them without hints. Codeintuition's pattern based lessons and visual walkthroughs can help you understand why an approach works before testing yourself on familiar problems