The biggest mistake you’re probably making for your FAANG/MAANG Interview prep
This mistake causes developers to waste days and months with no success.
As some of you may know, I used to work with people in helping them ace their Leetcode interviews. By sharing my insights into Programming, Leetcode, and System Design- I was able to develop a community of over 30K+ software engineers, product managers, and students who are all aiming at cracking the coding interviews and taking the next step in their careers.
As useless as they are, Leetcode interviews aren’t going away anytime soon. As the market situation improves, companies will start hiring aggressively again. At this point, I have interacted with hundreds of aspirants who are looking to crack their interviews and take their skills to the next level. Through my conversations with these folk, I have noticed a huge error that a lot of people preparing for these interviews make. This error is the source of months of frustration, and failure, and ultimately causes many people to give up. In this article, I will be sharing what this error is, why it’s a problem, and what you should do to fix it.
Getting ready for your Leetcode Interviews? Don’t miss this
The Biggest Leetcode Error you’re probably making
Leetcode is not DSA- Getting right into the matter, the mistake that I’ve seen countless aspirants make is conflating the study of DSA (Data Structures and Algorithms) with the study needed to become good at Leetcode problems. This is an easy mistake to make (most people when giving advice short-hand Leetcode prep as DSA prep). Unfortunately, this causes many people to go down the tutorial hell, where they keep watching YouTube videos/buying books on DSA while going nowhere. Leetcode and DSA are separate skills (related but very different in nature) and should thus be treated so. Let’s now cover studying one to master the other is a waste of time.
Why you should not waste your time studying DSA for Leetcode- Let’s assume that you’re someone who wants to study Data Structures and Algorithms only for the purpose of Leetcode (unfortunately this is an overwhelming majority of people I talk to). In this case, spending hours on books/courses/videos dedicated to exploring the various Data Structures and Algorithms- how they are built, their little nitty gritty, etc is a giant waste of time. All you really need is the following- the background to why data structure/algorithm is useful, 5 simple examples of how that idea shows up in Leetcode Question(keep the examples as direct as you can at this step. There is plenty of time to get fancy), and the relevant time/space complexity. You really don’t need to know too much more to get good with the Leetcode Questions. Studying beyond this takes away from the time you will spend practicing Leetcode Problems/taking breaks- which ultimately defeats the purpose. Focusing on any more is analogous to following an Olympic Sprinters training routine to get good at football (⚽⚽). Yes football requires a strong ability to run, but you can only realistically train so much. You’re better off working on drills that will help you get better with football.
How to study DSA for Leetcode-
So how can you study DSA for Leetcode effectively? There are multiple steps to the process-
- Blackbox- The first step is to black box the DS/A. Simply put understand two things- the inputs it takes and the outputs it generates. Understand this stage intimately- if someone asks you to find a value in a sorted list you should scream binary search, even if you can’t implement the binary search yet. That is all you need to do at this stage; it is simply about building recognition. If you’re skeptical about this, Top Competitive Programmer, Colin Galen also talked about this method being a godsend in helping working with complex ideas. We also covered the benefit of black boxing on the post- How to learn a new codebase very quickly.
- Build Associations with Code- The next step is to turn your theoretical black box and start building associations with the code. This is done by working on easy problems involving your particular DS/A. This step is crucial to help you with the mechanics of the idea (quickly implementing the core functionality). I recommend using easy questions for this stage (almost exclusively). To learn more about this read the post- How to use Easy Leetcode Problems.
- Iterate- As you try to solve each problem, it is important to note down your experience with the problem. Where are you struggling? How is your solution different from the actual solution? Is your issue knowledge (spotting a BFS) or implementation (coding it up)? These will help you constantly work on your weaknesses.
- Build a Framework- As you get more advanced, it can be helpful to create frameworks/templates to solve certain problems. As you study multiple problems of the same topic- you will see similarities that you can abstract into a template. This will be a game-changer in helping you finish problems quicker (and will help with confidence). For an example of templates that can be helpful check out the recursive function template I covered here that has helped tons of people moonwalk through their Leetcode problems involving recursion.
Why you should not use Leetcode to study DSA-
I’ve also spoken to some people that think that studying Leetcode is enough to master DSA. Even hard Leetcode problems have very little carry-over to mastering DS/A for your work as a Software Engineer. Here are a few reasons why:
- Leetcode problems are often very specific and don’t give you a good overview of the underlying concepts. They have very guidelines (how many times do your clients tell you the inputs, outputs, and constraints very clearly).
- Leetcode problems are often designed to be difficult, which can lead to frustration and discouragement.
- Leetcode problems don’t teach you how to think about problems in a general way.
The next go-to is to rely on books/courses etc. These are better, but still not optimal imo. These sources give you a lot of knowledge but miss one important facet that is crucial to master DSA in the application stage- context. I could beat you with my 600-page Abstract Algebra textbook till you remember every word and can solve every problem, but that may not translate to your ability to use groups for better Object Design. It’s much easier to point you to an engineering blog/talk where a team talks about their challenges and how Group Theory is useful.
How to Study from Engineering Blogs/Talks- I have a whole article on how people can use research papers/blogs to get good at Machine Learning. Use the method mentioned there, but replace the ML with whatever you want to study. That’s really it. The important point is to understand that industry tools and SOPs are always changing. It’s important to study a bit regularly, as opposed to overloading your studying for a few intense months and then not staying in touch with the field.
That is it for this piece. I appreciate your time. As always, if you’re interested in working with me or checking out my other work, my links will be at the end of this email/post. If you like my writing, I would really appreciate an anonymous testimonial. You can drop it here. And if you found value in this write-up, I would appreciate you sharing it with more people. It is word-of-mouth referrals like yours that help me grow.
Save the time, energy, and money you would burn by going through all those videos, courses, products, and ‘coaches’ and easily find all your needs met in one place at ‘Tech Made Simple’! Stay ahead of the curve in AI, software engineering, and the tech industry with expert insights, tips, and resources. 20% off for new subscribers by clicking this link. Subscribe now and simplify your tech journey!
Using this discount will drop the prices-
800 INR (10 USD) → 640 INR (8 USD) per Month
8000 INR (100 USD) → 6400INR (80 USD) per year (533 INR /month)
Reach out to me
Use the links below to check out my other content, learn more about tutoring, reach out to me about projects, or just to say hi.
Small Snippets about Tech, AI and Machine Learning over here
AI Newsletter- https://artificialintelligencemadesimple.substack.com/
My grandma’s favorite Tech Newsletter- https://codinginterviewsmadesimple.substack.com/
Check out my other articles on Medium. : https://rb.gy/zn1aiu
My YouTube: https://rb.gy/88iwdd
Reach out to me on LinkedIn. Let’s connect: https://rb.gy/m5ok2y
My Instagram: https://rb.gy/gmvuy9
My Twitter: https://twitter.com/Machine01776819