r/datastructures • • 6d ago

DSA 😭

How to master DSA? I actually tried to do it and gave up many times and also forgot many concepts... I could solve many problems directly but I couldn't solve word problems or scenario problem kinda shits🥀

82 Upvotes

20 comments sorted by

15

u/cmdjunkie 6d ago

You cannot master DSA. You can only learn enough to apply what you've learned so you can learn more efficiently to more efficiently apply yourself.

1

u/PriorityFabulous5300 6d ago

Yup that's my issue... I don't know how to do that ... Im a final yr student tryna master ai frameworks... But DSA has always been a problem to crack big companies

7

u/cmdjunkie 6d ago

Narrow your focus. Pick one data structure and one algorithm. Learn the generic implementation in your favorite language. Study it in and out. Draw how it works on a piece of paper. Figure out where it applies. White board it. If you really get it inside your head you will start to see real word representations of it (e.g. dishes stacked up as a stack; people in line as a queue). That's when you know you've got it down. Then tackle another one. It takes time, so take your time and enjoy it. A lot of learning is done away from the keyboard when your mind has time to think. Don't overload yourself on too many concepts. Let the one you're working on simmer so you can think about it while you're driving, or staring out the window on the train. Hope this helps.

1

u/PriorityFabulous5300 6d ago

that seems to a very good take away... Thank you

2

u/Parking-Criticism112 6d ago

Would you like to learn together I'm also struggling well for jt

1

u/PriorityFabulous5300 6d ago

Ofc welcome to the struggle 🥀

2

u/Parking-Criticism112 6d ago

Thank you for having me 🥀

1

u/AdiptaBasu 4d ago

See. Even I had the same problem. Then what I did was take a mixed approach. Dive straight in a problem, and then figure out the theory. Since I cannot rest easy with an unsolved problem that I know I can solve, it really helped. Also, start with the easier data structures first. Then move up in difficulty. Don’t start all of them together. And when you feel like giving up. Just remember that if you do, you will never be able to do it and just power through. For me personally, it was monotonic stack. Hope this helps. Cheers, take care.

1

u/PriorityFabulous5300 4d ago

Thank you... I think it helped me... Any tips for scenario based problems??

3

u/Particular_Shower536 6d ago

I could not do it in 27yrs. I feel DSA is like playing cricket... you might be a total illiterate and yet play cricket well... I feel DSA is also like that - even some unknown college guy with no credential can somehow do DSA pretty well and get into Google. So it is not worth trying if you do not crack it in a month is what I feel.

1

u/MostNeighborhood68 5d ago

Coding since u were born?

3

u/Particular_Shower536 5d ago

I am 51, buddy 😏

1

u/Recent-Hat-5262 3d ago

Wth? Ur lying

2

u/Particular_Shower536 3d ago

No buddy, I’m not… I’m still a coder, always have been a coder, but I could never crack algods… For web applications, all you care about is your DTOs and storing them in a map, list etc - you don’t need to do Dijkstra for your day-to-day work… So it never clicked…

1

u/That-_what_she_-said 6d ago

Then try to solve dsa pattern wise

1

u/gaurrishabh 6d ago

I am also in this phase rn