🧘 Therapy for Leetcode Warriors
How to prepare for coding interviews - do less, not more
I'm glad you're reading this post. However, to truly understand it, please read this article first. Fortunately, there is a simple time-tested way to prepare for interviews. Remember the many online resources available today? Ditch them. Yes, ditch them all. Pick one good resource. Just one. And focus on mastering it. Not just going through it once, but 2-3 times. Know it so well that you can solve its problems within 5 minutes. 5 minutes? Isn't that crazy?! It's really not. For example, here's a question for you. Can you code a simple binary search in 2 minutes? If not, that's probably a warning sign. Binary search is one of the most popular algorithms in interviews. If you can't code the very basic version in 2 minutes, how will you handle a complicated version in 30 minutes? Remember, the 30 minutes includes clarifying questions, running test cases, finding a solution, taking examples, coding, etc. Now, another key is picking a good resource. Don't pick Leetcode for heavens sake. It's completely unorganized, has 1500 problems, and treats interviews like competitive programming. Leetcode is a big reason engineers are so overwhelmed today. Instead, pick a book or a course that teaches ~100 well represented problems. And don't pick a book or course that has only problems. Pick something that teaches you to think about them. When you master the resource in 1-2 months, you'll make significant progress towards that hiring bar. Now that you're confident of that resource, do it again. Practice doing its problems quickly. Repetition is the key to mastering concepts. In math class, you repeatedly solved equations didn't you? Do the same with algorithm problems. Only now can you switch to another resource. Because you've mastered the first resource, you'll find the second resource much easier. You'll find that you've started building intuition for problems. You'll feel a lot more confident. Master this second resource too. This should get you most of the way towards the hiring bar. Think about it - between the 2 resources, you would've done 200-300 problems, which is an excellent number - provided the problems were well picked and asked in actual interviews. Now, just meeting the bar doesn't mean you will get offers left or right. There's always some luck involved in technical interviews. If you do more resources now, you can move towards maximizing your chances. And that's a great thing. Do you see the difference? Doing more resources is maximizing your chances, not making you reach the bar. The main part of prep (reaching the bar of problem solving) was accomplished by mastering your 2 core resources. And therein lies the answer to the perennial question - despite the abundance of resources, why is it still a struggle to get the job at Google or Facebook? It's because now, everyone is focusing on the second part - maximizing your chances. They're ignoring the first part - reaching the problem solving bar by mastering 2 core resources. Build a strong foundation first. Don't stress out about the number of problems. Often people feel guilty of focusing on fewer problems. They fear that they're missing out - I call this Leetcode FOMO. After all, everyone says - "do more"! However, deep inside, you know you want to do less. If it helps in any way - I'm giving you permission to do less. Don't stress about doing 1500 problems. Focus on a few. You can do more later, I promise. To summarize, here are the main points covered in this article: 1. Focus on one resource at a time. 2. Master that resource completely. Repeat it at least once. 3. Pick a good resource that has a comprehensive collection of ~100 problems. 4. Use 1-2 resources to reach the hiring bar, then more resources to maximize your chances. 5. Focus on reaching the hiring bar first - it's the reason most candidates fail. 6. Do less, it's ok.
Balance Check [1] Now, you don't want to get lazy either. When I say "do less", I don't mean "put less effort". I mean focus on fewer problems first and master them. Around 100-150 problems seems to be the optimal number for this.