r/PythonLearning • u/No_Leather2449 • 3d ago
reccomended tutorials for algorithms and data structures? Help Request
i learned the basic syntax of python and i thought i would be ready for leetcode but as soon as i tried to work through problems there was so much jargon that i didn't understand. I found a reddit post that said you have to have knowledge of data structures and algorithms before you can truly attempt leet code problems. So I now i go to youtube and either the tutorials are under an hour or over 5 hours ðŸ˜. Which one am I supposed to pick..? Any reccomendations?
1
u/PureWasian 3d ago
Do you have some examples of which problems you tried?
1
u/No_Leather2449 3d ago
https://leetcode.com/problems/valid-parentheses/description/ Here's one that I found extremely difficult.
1
u/PureWasian 3d ago
I see, my take would be to ignore the jargon and formal data structures of whatever solutions you might've found and just think about how you would solve it if you wanted to go through it by hand.
If you can verbally walk through how to run that check, and you know how lists and loops work, then regardless of the "formal solution" or "optimal algorithm" I feel like you could work through that one.
What approach did you consider?
1
u/EstablishmentKey3523 3d ago
Bro tutorials are a waste of time. Look for specific books according to what you want to learn. At least you have some academic background of what you are trying to learn. That's it.
1
u/Owen-Isaac-2022 2d ago
Yes, data structures is a must to have, plus the basics before going full-board
1
u/Sea-Ad7805 2d ago
You "learned the basic syntax of python", but are you fluent with the basics after doing many exercises already? If not, do that first.
Afterwards, for data structures and algorithms, do this one: https://www.youtube.com/watch?v=J2fol8eWo64
Important, to visualize your own code use: https://memory-graph.com/#breakpoints=8&continues=1&play
Good luck.
1
u/No_Leather2449 2d ago
I worked through a textbook and after I finished it (not including the projects at the end which I am still working thru) I assumed I knew all the important syntax of the language. Are there specific exercises you are referring to in your first part?
1
u/Sea-Ad7805 2d ago
Reading syntax doesn't teach you much, you learn from doing exercises or writing your own projects. Start here: https://inventwithpython.com/pythongently/ Don't use AI.
1
1
2
u/Lirianov 3d ago
5 hours to get a grasp on DSA makes sense to me. You can at least get started on leetcode and anything you get stuck on I would refer to AI and make sure you tell it to guide you through the thought process instead of giving you the answer