r/leetcode • u/Additional_Reveal822 • 3d ago
Question How long does it take to master DSA?
I started grinding Leetcode seriously 2 weeks ago. I subscribed to Leetcode premium and also bought a crash course for more structured learning. However, it seemed like it took me forever just to pick up how to solve the simplest "String and Array" problems 😂 I think the course does help me to understand the basic concepts like two pointers, sliding window etc. But to really master and apply the same concept to different questions is quite difficult. It's been two weeks and I am still stuck at solving string and array problems, I feel like a joke. For all the experienced and smart people here, can you please point me to the right direction? Tell me how to master DSA quickly? Because I am afraid I am not fast enough to learn everything before my upcoming interview.
41
u/jyscao 2d ago
Depends on what level you consider mastering to be.
Being good enough to pass say at least half of the coding interviews given out there? Maybe 6mo to 2 years depending on your existing level and aptitude for picking up the DSA patterns.
Being a legitimately impressive CP problem solver? Much longer, and you'll probably be working towards it for the rest of your life.
17
u/tehfrod 2d ago edited 2d ago
To truly master it you would have to spend at least a few years working at a PhD level or industry equivalent, and not just playing leetcode.
To get good enough to pass a FAANG interview, assuming you already had the basics in a uni course, probably six months if you're just doing leetcode, less if you are actually studying it with intent from good source materials.
I failed my first FAANG interview, studied hard for about three or four months using good quality books and lectures, and made it on the second try.
5
u/Comfortable_Put6016 3d ago
my approach is do 2-3 exercises that teach a specific algo or data structure / are supposed to be solved with a specific algo or data structure and thats it
i then go around and search for different problems and try to reduce them towards these algos / datastructures ; but i suppose its based on intuition and problem decomposition
i suppose the last part the decomposition plays the most part aka breaking down a problem and tryting to make sense of behavior in data / restrictions/ intended goal and work around from there
dsa works more like a toolkit to reduce towards rather than memoization of sprecific solutions for specific problems
5
u/Material-Command-854 3d ago
It can take months. I would try to temper your expectations but not give up. Be patient with the process and yourself.
3
u/soft_abyss 2d ago
It takes a long time for it to stick long term imo.
2
u/maaKaBharosaa stole bananas from koko 2d ago
For me it took around 2.5 years to reach 1800 at leetcode
1
u/duluoz1 3d ago
You sure you want to be a SWE?
3
u/AlgoMonster_Official 1d ago
2 weeks is nothing honestly, nobody masters this in weeks. You just slowly get comfortable, and for most people that's a few months. Being slow on string/array stuff at the start is normal.
Dont worry about not being able to apply the learning to new problems directly. If you're stuck for 20-30 min, just read the solution, write one line on what in the problem should have tipped you off (sorted input, "find a pair", etc) and redo it from scratch 2-3 days later.
1
u/Leather_Grand2896 21h ago
Two weeks in and finding it slow is completely normal. Rough timeline most people see:
- First few weeks: easy problems feel hard and you need the solution often
- Around 60-100 problems: patterns start repeating and you recognize them
- Around 150-200: most mediums feel approachable
What speeds it up: group problems by pattern at first, re-solve the ones you got stuck on a few days later, and don't measure progress by count.
1
u/[deleted] 7h ago
[removed] — view removed comment