How to use Easy Leetcode Problems [Technique Tuesday]
Using these will boost your preparation 10x
Hello all,
When I cover my recommended plan for acing the coding interviews, many people are surprised by the fact that I recommend they do a lot of easy questions. This confusion makes sense because all the big companies expect you to be able to solve at least medium-level questions during their tech screen. So what purpose does solving easy questions solve? We’ll cover that and much much more.
Highlights
Y’all love this section, so we’re making this a permanent addition. In this post, we will cover the following ideas-
Why do Easy Questions- Since the questions are easy, you can do a lot of them very quickly. This allows you to cover a lot of volume. Fantastic for developing both Coding Skills and developing your familiarity with a new idea.
Why can’t you use Medium questions to learn- You technically could. And they will teach you a lot. However, since they have more moving parts, you will have to put a lot more time and energy into mastering them. Using Easy Questions to master the foundations will severely cut down that time.
How you should integrate Easy Questions into your plans- Easy questions will boost your coding and reinforce the basics. Medium Questions to improve your problem solving and implementing the lessons of the easy questions. And hard questions to really understand how concepts can be implemented in different contexts. A good plan balances all these out. I’m about to give you the best plan ever.
I’m sure these ideas will help you all in your interview prep. If they sound interesting, go through this in great detail. It will help you develop your program for acing your interviews.
In Praise of Easy Questions
Many people ignore easy questions using the following reason, “The Interview will ask me Medium or Hard Questions. So Easy Questions are a waste of time. ” Others will do Easy Questions, but only order to move on to the harder questions. If you’ve read my article, “How I helped a non-Computer Science student nail a FAANG software dev job”, I mention that of the 10 questions I had her do every week, 5 were easy. I’ll go into the rationale for them now.
Effective practice consists of two components, the number of questions you do and the amount each question teaches you. Each question also has another important dimension- How long you need to FULLY integrate .questions take a while to integrate well, but teach a lot. Easy questions don’t take too long to learn from, but also don’t teach you a lot. Simple enough? But here’s what a lot of people miss.
Easy questions teach you the basics. Take the example of the merge binary trees question in the merge two binary trees question. It’s a simple question. The solution is not all that hard to wrap your head around. But the approach of the question, can help you solve most tree questions. They can all be broken down as the following:
def treeFunc(root, **other params):
if(root==null):
return baseCase/other relevant params
val=operation(treeFunc(root.left), treeFunc(root.right))
return val
The following thread contains a lot of the examples. In the context of merging trees, this shows itself as:
def merge(t1, t2):
if not t1 and not t2:
return None
elif not t1:
return t2
elif not t2:
return t1
else:
node = Node(t1.data + t2.data)
node.left = merge(t1.left, t2.left)
node.right = merge(t1.right, t2.right)
return node
See the similarity? Think about tree traversal, calculating the depth of a binary tree, and many other operations. They tend to rely on a very similar structure. This applies to many kinds of problems. Easy questions are great ways to introduce yourself to different ideas and concepts. They can teach you the first steps, which are crucial to unlocking the harder level concepts/ideas. And they do so in a time effective manner. Since easy questions don’t take a long time to fully integrate and learn from, you can do more of them. More questions →you’re exposed to more ideas → you’re able to handle a greater diversity of problems in your interviews.
Why can’t I use Medium/Hard Questions to learn/familiarize myself with these concepts?
Fantastic question. If easy questions can teach you these things, surely medium/hard questions can as well? Yes they can. Without a doubt. And they will teach you a lot more. But these questions contain a lot more moving parts. In an hour/hour and a half you will at best be able to get through 1–2 of these questions. In the same time, you will be able to finish 2–3 Easy Questions.
So now you might be wondering the following:
Why Can’t I Just Spend More Time Practicing? People online spend 5+ hours daily on that Leetcode Grind?
Again you could. But do you have that kind of time? The people I tutor have a life outside interview prep (full-time work, family, social obligations, etc etc). You will have to interview prep outside your job/school. And you can’t do it while sleeping. Assume 8 hours of work, and 7–8 hours of sleep (please sleep atleast this much, it’s proven to be the most important for your health). This leaves you with around 8 hours of free time. If in this time, you decide to spend 3–5 hours practicing hard questions, you will burn out. As any health expert will tell you, rest and recovery is a crucial part of getting better. And the 3–5 hours of high intensity practice after a full day will break you down.
The alternative is that you will put in a lot of “junk practice”. You’ll be tired from work, and so you will skim through practice, going through the motions without learning much. If you have practiced a question, but not been solve it when you came back to it later on, you likely did junk practice.
In, “The 4 step method my students use to maximize Leetcode Problems and ace their FAANG Interviews ” I talk about the steps you can to benefit from every question you practice. But you will notice that these steps require focus, concentration and a need to iteratively learn from feedback. You can’t do this if you’re tired. And trying to put 3–5 hours after your full day will leave you very tired. You’re much better off putting in 1–1.5 hours of good quality practice and resting the rest of the while.
For similar reasons loading up many hours on the weekend will be counterproductive. There is a diminishing returns to how productive you can be. 5 hour weekends will likely not be the answer for you.
So How Should You Proceed?
This is likely on your mind. I’ve talked a lot about what not to do, but not enough about what to do. This section will give you a good guide on how you can design your weeks to maximize your time and nail those interviews. By following this guideline you too will see the results like this
We want to make sure we have a good balance between doing a lot of questions, and good quality questions. Both 20 easy questions and 3 hard weekly questions will not help you. Since we will only be doing high-intensity practice, we will assume 1–1.5 hours/day on average. We also need to make sure you at least one mock interview a week. This improves your ability to work under a timer and gives you pointers about your communication ability.
So putting things together we get:
Monday-Tuesday: You have 3 hours to work these two days. You will use this to go over the 5 easy questions. Make sure you understand every little detail about the questions. These days will keep us sharp, and allow us to get a great diversity of questions. Great for building and maintaining proficiency.
Wednesday-Saturday: We use these days to work the Medium-Hard Questions. We want to work to get done with atleast 4 Medium and 1 Hard question in this time here. Since Saturday is a weekend, we can put in a few extra hours (1–1.5 hours more at most) to meet our requirements. These days will improve our problem-solving abilities.
Sunday: Sundays are for Mock Interview+Review. This is to desensitize us to the interview setting and allow us to make sure we can translate our learning into the interview. You can also use this day to review your week and see if there are any problems that are popping up with you.
This plan will allow you to make the best of both worlds. You are able to get a good volume of your questions. But you are also spending a good amount of time on harder questions (by time, we spend most of our week here). And you have an interview to track your progress. For more details on how you can give the best answers in your Mock Interviews check out, “How to Design your Mock Interview Answers to nail your FAANG interviews”. Use the principles of this plan, and you will see great results.
Before proceeding, if you have enjoyed this post so far, please make sure you like it (the little heart button in the email/post). I also have a special request for you.
***Special Request***
This newsletter has received a lot of love. If you haven’t already, I would really appreciate it if you could take 5 seconds to let Substack know that they should feature this publication on their pages. This will allow more people to see the newsletter.
There is a simple form in Substack that you can fill up for it. Here it is. Thank you.
https://docs.google.com/forms/d/e/1FAIpQLScs-yyToUvWUXIUuIfxz17dmZfzpNp5g7Gw7JUgzbFEhSxsvw/viewform
To get your Substack URL, follow the following steps-
Open - https://substack.com/
If you haven’t already, log in with your email.
In the top right corner, you will see your icon. Click on it. You will see the drop-down. Click on your name/profile. That will show you the link.
You will be redirected to your URL. Please put that in to the survey. Appreciate your help.
In the comments below, share what topic you want to focus on next. I’d be interested in learning and will cover them. To learn more about the newsletter, check our detailed About Page + FAQs
If you liked this post, make sure you fill out this survey. It’s anonymous and will take 2 minutes of your time. It will help me understand you better, allowing for better content.
https://forms.gle/XfTXSjnC8W2wR9qT9
Happy Prep. I’ll see you at your dream job.
Go kill all you magnificent maestro,
Devansh <3
To make sure you get the most out of Technique Tuesdays, make sure you’re checking in the rest of the days as well. Leverage all the techniques I have discovered through my successful tutoring to easily succeed in your interviews and save your time and energy by joining the premium subscribers down below. Get a discount (for a whole year) using the button below
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
Get a free stock on Robinhood. No risk to you, so not using the link is losing free money: https://join.robinhood.com/fnud75