What's the correct way to do DSA?
Posted by Bizurels@reddit | ExperiencedDevs | View on Reddit | 13 comments
I understand programs well, start to finish whenever I'm seeing them in video.
But when i try to write them myself, I don't remember, and i feel like needing to learn the code. If I can't build logic why can I understand everything when I see it in a video?
What's the correct way to master it?
EnderMB@reddit
It depends what you need to learn it for.
For interviews? Prep specifically for interviews, review the patterns, repeat the same problems on a cadence, until you're comfortable.
For work? Figure out the problem you're solving, whether you need these specific structures or algorithms, and make the necessary trade-off's to accommodate learning. More often than not, these problems are already solved, so you don't need to implement - you just need to determine what the benefit is, what the standard libraries are for this, and how to fit it into your existing way of working.
Bizurels@reddit (OP)
I want to join google, and i just know theoretical DSA i haven't solved anything until now
EnderMB@reddit
In that case, I'd spend some time on LeetCode, as well as their forums to get a feel of the kind of questions you'll get, what specifically comes up in the DSA and system rounds, and then work out a plan of attack. For Google specifically (a Googler may disagree here) I'd probably not pay for LC to get the Google-specific questions, because their question bank changes very frequently.
ExperiencedDevs-ModTeam@reddit
Rule 5: No “What Should I Learn” Questions
No questions like “Should I learn C#” or “Should I switch jobs into a language I don’t know?”
Discussion about industry direction or upcoming technologies is fine, just frame your question as part of a larger discussion (“What have you had more success with, RDBMS or NoSQL?”) and you’ll be fine.
tl;dr: Don’t make it about you/yourself.
HoratioWobble@reddit
The correct way is to learn by putting them into practice. If you're not using them in practice, there isn't much use in learning them outside of morbid curiosity
Bizurels@reddit (OP)
So i shouldn't only focus on leetcode?
HoratioWobble@reddit
As an experienced engineer - no Unless you're doing it for your own learning or you're specifically trying to get in to a company that uses them for entry (like Meta).
Bizurels@reddit (OP)
I want to join google
rcls0053@reddit
Deep DSA knowledge is only very useful in a niche area of software development, but it doesn't hurt to know the basics. When it comes to leetcode, those types of puzzles are mainly used for interviews, but they serve very little practical purpose when it comes to the actual job.
Still-Gold-6146@reddit
Start building projects, exit tutorial hell
Bizurels@reddit (OP)
But isn't DSA about solving leetcode? I was starting it by learning normal programs first like palindrome prime number etc.
Still-Gold-6146@reddit
Bro your leetcode doesnt mean shit if u cant write code by hand
Kriemhilt@reddit
You only learn completely by doing.
Understanding a video (or textbook, or someone speaking) is different from being able to do it yourself. It always has been, in basically every field.
This is why all good instruction courses include exercises for you to do yourself and solidify your understanding of what you just saw, read or heard.