The biggest mistake you're probably making for your Leetcode Interview prep [Storytime Saturdays]
This mistake causes developers to waste days and months with no success.
Hey, it’s your favorite cult leader here 🐱👤
On Saturdays, I will cover stories/writeups covering various people’s experiences 📚📚. These stories will help you learn from the mistakes and successes of others. These stories will cover various topics like Leadership, Productivity, and Personal/Professional Development. Use these to zoom ahead on your goals 🚀🚀
To get access to all my articles and support my crippling chocolate milk addiction, consider subscribing if you haven’t already!
p.s. you can learn more about the paid plan here.
As some of you may know, I used to work with people in helping them ace their Leetcode interviews.
That was actually how this newsletter got started (I had a lot of people reach out but couldn’t work with them all)!! That’s why the Substack link still says Coding Interviews Made Simple for the newsletter. We’ve come a long way since then, with the content now being a more comprehensive look at technology- from financial, technical, and sustainability perspectives. I was a little nervous about making that transition, but it seems like y’all have really appreciated it. Below are some of the testimonials I got, just in the month of May!!!

While this new change has been fun, I figured I’d go back to our roots for this article. Leetcode interviews aren’t going away anytime soon, and as the market situation improves, companies will start hiring aggressively again. And with that will come a new batch of aspirants of hopefuls that aim to get those sweet MAANG offers. However, based on my past conversations with people that are preparing for these interviews, 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.
Loved the post? Hate it? Want to talk to me about your crypto portfolio? Get my predictions on the UCL or MMA PPVs? Want an in-depth analysis of the best chocolate milk brands? Reach out to me by replying to this email, in the comments, or using the links below.
Stay Woke.
Go kill all,
Devansh <3
Reach out to me on:
Instagram: https://www.instagram.com/iseethings404/
Message me on Twitter: https://twitter.com/Machine01776819
My LinkedIn: https://www.linkedin.com/in/devansh-devansh-516004168/
My content:
Read my articles: https://rb.gy/zn1aiu
My YouTube: https://rb.gy/88iwdd