Geek Culture
Published in

Geek Culture

Don’t make this mistake when using Leetcode for your FAANG/MAANG Coding Interviews

Many people make this mistake, and it might be holding you back. Applicable to all levels

I have tons of students reach out to me for tutoring. These are people that have often gone through the grind, subscribed to multiple services (AlgoExpert, Leetcode Premium, etc. ) but they can’t take their preparation to the next level. Upon talking to them, it becomes clear that they are making some key mistakes that are holding their performance back. Take the example of this student who reached out to me a while back. Let’s name this student Soma.

Soma had prepped on his own, and gotten to a reasonable level. However, he was stuck at his level

Soma was among the higher-level people that had reached out to me. He could finish most Medium problems within the time limit. However, he just couldn’t progress beyond that point. As you can see, he had definitely put a lot of work 170 problems in 2–3 months is not a joke. It’s way more than what I have my students do. Even for the most hardworking of them, I only recommend at most 10 questions/week. Below is a sample plan I recommend in one of my articles.

Notice how we mix in a variety of questions with different difficulties to maximize returns.

You should read the full article here to get a more detailed understanding of why we lay things out the way we do. That will help you develop your own plan. But it should be clear that Soma was definitely someone committed to acing their interviews and getting better.

As I started to work with Soma, I identified what was holding him back. It was a mistake that many people make. It is something I’ve noticed from both beginner and more intermediate-advanced Leetcode problem solvers. In this article, I will share that mistake is, where it comes from, and how we can fix it. By the end, you will be many steps closer to acing your coding interviews, and landing those finance/FAANG/other tech jobs.

The Mistake

Since I don’t like wasting time, I’ll get right into the mistake. The mistake is: filtering your problem by specific topics. There is a correct way to use this feature and the way most people use it is wrong.

This is a screenshot from Leetcode. Someone who struggles with DFS might filter for only DFS problems.

This mistake comes from all the bad/incomplete advice on the internet. The advice that is most commonly given when someone struggles with problems of a specific data structure/algorithm/type is to focus on that subset. Dynamic Programming is hard? Do some DP problems for 3 weeks. Graphs/Recursion is a struggle? Use the Leetcode/Hackerrank Filter to focus on them. It seems like this makes sense. However, if you do just this, you will not get much better. To understand why let’s learn about learning

Lets’s get a little nerdy. Remembering to Applying are called lower-order learning and the rest are higher-order learning

Not all kinds of learning are created equal. On the lowest level (the weakest kind of learning) we have remembering, which is just memorization. In the context of Graphs, that would be something like Memorizing that Breadth-First Search on a roadmap has a time complexity O(K+V) without understanding why. Understanding would be understanding the theory behind graphs while applying would be actually being able to use it for something like the word ladder problem (a context different from a traditional map). What counts as higher-level learning? How about seeing that graphs are great Data Structures for storing relations and creating Graph Neural Networks for Social Media?

Let’s take Soma. He too struggled with Graphs (never met someone who has had an easy time with them lmao). He watched a few videos. Then, he started to do only Graph problems on Leetcode. He was able to get past the easy problems after some practice. Started solving Medium problems as well. But as he went back to regular practice, he noticed that even though he had learned and understood graphs, he was still inconsistent. His performance with Graphs had even slipped and was worse than what it had been when he was doing only Graph problems. Had he forgotten everything he had learned?

A picture says a thousand words, but in our case, we only need one

Think back to the levels of learning. By filtering for only the Graph problems- he had deprived his mind of the opportunity to make connections. Since he already knew that the problem was related to Graphs in some way, his mind was able to solve the problem by thinking of graphs and trying to fit them in when he got stuck. He had gotten a huge hint before he had even started.

This is true for many concepts. Think of the Rolling Hash Concept. Once I tell you a particular problem implements a rolling hash, then you will have a much easier time coming up with a solution.

So What Should You Do?

Now that you’re convinced, we have to talk about what you should do instead. Worry not, that’s what I’m here for. And it’s a pretty simple tweak but it will have outsized returns. Let’s see why.

The law of Diminishing Returns hits hard

The approach of working specifically on what you struggle with has its benefits. As mentioned earlier, it will get you through the lower levels of learning. Specific examples/questions will help you understand and apply even apply questions. However, after that point, it has diminishing returns. So we want to drop the approach and get back to regular practice

This is atleast how much you should know about data structures to get the most out of coding problems

The above image is an excerpt from my article, Your plan for acing FAANG interviews. In this excerpt, I talk about the baseline knowledge you need before you can truly benefit from Leetcode practice. If you think back to the levels of learning, the advice would give leave you around the applying stage.

Once you are at this, stage you want to go back to random practice (with maybe 1–2 problems extra in the area you struggle with). When you do struggle with a problem (of any type) you want to analyze its solution critically. You want to break it down, looking into your observations/assumptions reading the problems, where you diverged from the solution and alternatives. A more detailed how-to is found in my article: The 4 step method my students use to maximize Leetcode Problems and ace their FAANG Interviews

One of the many success stories. Trust the process and things will work for you

This kind of analysis will help you tap into higher levels of thinking (you are evaluating your solution and analyzing where it diverged from the correct solution). It might seem like a trivial change, but believe me, it makes a ton of difference. It will slow down how many Leetcode problems you can do (since you spend more time and energy on this analysis). But this Quality over Quantity approach will have huge returns.

If you liked this article, check out my other content. I post regularly on Medium, YouTube, Twitter, and Substack (all linked below). I focus on Artificial Intelligence, Machine Learning, Technology, and Software Development. If you’re preparing for coding interviews check out: Coding Interviews Made Simple, my weekly newsletter. You can get the premium version for less than 0.5 USD dollars/day. The premium version will unlock high-quality solutions to weekly coding problems, special discussion posts, and a great community. It has helped a ton of people in their preparations.

To help me write better articles and understand you fill out this survey (anonymous). It will take 3 minutes at most and allow me to improve the quality of my work.

Feel free to reach out if you have any interesting jobs/projects/ideas for me as well. Always happy to hear you out.

For monetary support of my work following are my Venmo and Paypal. Any amount is appreciated and helps a lot. Donations unlock exclusive content such as paper analysis, special code, consultations, and specific coaching:

Venmo: https://account.venmo.com/u/FNU-Devansh

Paypal: paypal.me/ISeeThings

Reach out to me

If you’d like to discuss tutoring, text me on LinkedIn, IG, or Twitter. Check out the free Robinhood referral link. We both get a free stock (you don’t have to put any money), and there is no risk to you. Not using it is just losing free money.

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

If you’re preparing for coding/technical interviews: https://codinginterviewsmadesimple.substack.com/

Get a free stock on Robinhood: https://join.robinhood.com/fnud75

--

--

--

A new tech publication by Start it up (https://medium.com/swlh).

Recommended from Medium

Python Program for Merge Sort in Linked List

Agile is Fragile

How List (Array) Works Inside Memory

The DNA of a great dev team

September Development Update

Make Animations With Python- Manim

Serverless Computing 101— What is it? Is it actually server-less

atoti: interactive visualization in Python notebooks

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Devansh- Machine Learning Made Simple

Devansh- Machine Learning Made Simple

I write high-performing code and scripts for organizations to help them generate more revenue, identify areas of investment, isolate redundancies, and automate

More from Medium

AlgoExpert: Ace The Coding Interview? My honest review

The Best Questions To Ask At End of a SWE Interview

Things you should know about Coding Interviews

LeetCode too Difficult? Start Here First.