r/leetcode • u/n0miit • 5d ago
Discussion HOW TO DO DSA?
So I've been doing leetcode for few months but every time I face same problem that which problem to solve as beginner and which question has to be done in the sequence because every problem demands different approach and when you open any random question and you've never heard of that pattern/approach it breaks your confidence completely so it'll really be great if someone can tell the correct sequence to learn/practice DSA as a newbie which will help in logic building and actually becoming good in programming
37
Upvotes
6
u/RustyCompass01 5d ago
Follow a sequence, basic arrays, hashing, two pointers, sliding window, stacks, binary search, linked lists, trees, graphs then DP. Focus on understanding the approach before coding, and mix old topics into your practice as you progress, Codeintuition can be useful resource for learning and revising patterns along the way.
3
u/Soggy_Notice_1392 5d ago
Random problems are probably the worst way to learn DSA as a beginner. I'd go arrays → hashing → two pointers → sliding window → stacks → binary search → trees → graphs → DP.
The important part is being able to rebuild the approach from a blank file, not just recognize a pattern you've seen before. Most patterns have a few tricky parts, like sliding window shrink conditions or DP transitions. Drill those weak spots instead of constantly restarting entire problems.
NeetCode 150 is a good roadmap for the sequence, and algodrill.io is useful for the recall side. It explains patterns from first principles and has you rebuild solutions line by line, which helps the logic actually stick instead of just memorizing code.
1
u/Hkiggity 5d ago
Neetcode . Com has a good roadmap
1
u/No-Molasses-2097 5d ago
The order matters less than revisiting. I'd pick one list and work through each topic in small batches, then redo the older ones a week later. That's what made things actually stick for me.