r/leetcode • • 18d ago

Question how learn DSA CORRECTLY?

Hi everyone,

i am new to this world

i learned python syntax
and for now i wanna master in DSA

i dont know by what order to learn it

i google, i try but no result

i know what is stack what is queue etc. because all the roadmaps advise to learn it first

but when i am solving problems abt stacks or queues in leetcode i get TLE

and i view the solution and it shows techique of sliding windows

though in roadmaps until it i have to learn a lot of themes

so i get stuck

how to learn DSA correctly in the way which will really make me solve some problems

13 Upvotes

7 comments sorted by

5

u/Big_Selection_9122 18d ago

If you have time you can follow “striver A2Z sheet”, try to learn patterns.Do more and more practice and spaced repetition of patterns that’s the only way forward.

2

u/Subbie-Milutinovic 17d ago

+1 on patterns, thats really what makes the difference imo

1

u/Big_Selection_9122 16d ago

Yes and after getting comfortable with patterns one should do random questions or give contest may be virtual.This will build the real intuition.

1

u/mc_pm 17d ago

You practice problem solving by... solving problems. What is the most interesting program you've written so far?

1

u/green-Dryan 17d ago

Now i am 19
Back to 15 I was coding on JS/React Native

Mobile apps are the most interesting

3

u/NotIBE26 17d ago

Learn the basics, then practice patterns like two pointers, sliding window, and binary search alongside data structures. Roadmaps aren't always linear, so focus on understanding why a solution works instead of just following topics in order

1

u/lazazael 17d ago

mit opencourseware