How to best study for technical interviews for FAANG
How to study for technical interviews for FAANG (primarily focused on Leetcode).
Overview
This is going to be an article focused primarily on how to get good at the technical interview for FAANG. (Ignoring system design - which is for mid to senior level devs). So this article is primarily geared towards interns / new grads / those who haven’t ever studied Leetcode before.
First.. what is the technical interview?
Technical interviews for tech companies, tend to primarily focus on “Leetcoding”, which is essentially coding algorithm questions.
What is the problem?
“Leetcoding” as a beginner sucks. If you have tried to study technical interviews before, many people encourage Leetcode as the primary resources, thus why the genericization of the term “just leetcode”.
But here is the problem with Leetcode, do you study calculus by doing 100 calculus questions? No! You don’t.
You study calculus by reading the chapter first, understanding what you can, doing the practice problems, and iterating on your understanding.
The problem with Leetcode is that doing a bunch of loosely related problems with no strong foundation ultimately will lead you to wasting a lot of time.
Prerequisite:
Before I jump into what I recommend to study with, you do need a basic understanding of data structures. What is an array, what is the time complexity to pop() and push() to an array, what is a hash-map, so on. If what I said doesn’t make sense to you, then you should learn some basic data structures first. Udemy is a great option, Youtube, Neetcode, Algoexpert, so on.
Personally, I had a basic concept having taken data structures and algorithms in college, but being really bad at it, so I just bought a cheap course from Udemy, and reviewed the concept on a as-needed basis. But if you have absolutely no understanding of data structures you should first learn that.
Jose Portilla course on Udemy for Python. I felt it helpful for beginners.
This is also another upcoming Udemy course by Elshad, that also seems good.
Honestly, anything on Udemy with good review is probably quite decent, and with a 30 day return policy, you can always return if it doesn’t fit your style.
Language to Use
Python is the easiest in my opinion to learn. Versus C++ and Java which tends to be more verbose, Python is great for interviews due to the speed, ease, and a lot of built in functions. Obviously, if you have your own language you prefer, go for it. But I tended to move all my mentees to pick up Python, within 1-2 weeks as they studied with me, and they found significant improvement in speed of solving just due to less verbosity and being able to focus more on pure logic than static typing.
Feel free to use whatever you want though - this is just a personal opinion for the average person out there I feel Python is great for interviews.
Study Time
In my opinion, the best amount of time to study before your first OA around 1.5 months to 2 months, and 3-4 months for your first interview. This is just my opinion that around this time is where most people really begin to have a good amount of time to let the knowledge settle.
This is assuming about 4 days to 5 days a week studying, at least 2-4 hours a day. Obviously the more the better, since the time is limited, and the more time dedicated studying efficiently the better. By more time I mean more days. More than 2-4 hours I think can cause burn out and be counter productive. So I’d max around 4 hours for a day.
This article covers more in depth on the actual application timelines + when to apply + the different situations you might be in.
Tips on How to Study
The first thing, is I really recommend watching this video. It gives a great breakdown of how “studying” works in my opinion between the idea of order of learning, encoding and decoding, so-on.
But if anything, what I want to point out is that most people for “Leetcode” only ever hit the idea of “remember”. The idea of how many problems do I need to grind, struggling to “remember” the solution, and trying to “remember” how to do questions - rather than focusing on all the above.
So I highly recommend when studying, try to study with a friend, teach someone else, teach each other, and take the time to “really understand”.
Personally, I found the most improvement teaching other people and my rate of improvement exponentially grew. Even recording yourself every once in the while doing a “mock”, I challenge you to see how you would critique yourself.
Study Resources
Thus… why I recommend..
Grokking the Coding Interview by Design Guru (affiliate link). Do not buy the one from Educative.io that is outdated course, and the company in my opinion has exploitive UI design, trying to trick you into a year subscription versus DesignGuru (the original author) has taken their course to their own platform and has kept it updated.
(P.S There is another company called HelloInterview that is free to use (!!) potentially as comparatively good as Grokking, that I don’t have experience using, but I’ll also add a review on at the end).
Note:
I do want to emphasize Grokking is not an end-all-be-all, you can easily fall into the same trap of still doing Grokking, reading the solution, and moving on. I just believe that it leans towards encouraging, you to analyze more, but it still requires you to actually sit down and analyze, which is exhausting.
I do want to note though, any resource can be great, as much as I critique them below, as long as you analyze, and my path is not the ONLY path. It’s just a path that I advocate for, but there is no right answer to get you to the end goal. I am only sharing what I taught my mentees and myself as to what I found the most consistent.
Okay, so why do I recommend Grokking the Coding Interview:
First Cost:
Comparatively to Leetcode, which is 35 dollars a month, or 160 dollars a year, Grokking is cheaper to start off with during their 40% off sale (~80 dollars), 30% sale (~90 dollars) - the 30% sale is usually always on while the 40% sale is around like holidays so-on.
Second Structure:
Grokking the Coding Interview is broken up into a distinctive pattern structure.
And this is why I really recommend it versus other resources such as Neetcode.io, Algoexpert, so on. Which are all great in their own right, but I think other resources are better suited to supplementary resources than Grokking which should be the core.
Having it in chapter forms in patterns, allow you to relate problems to a stronger core foundation. Ex. I could tell you this is everything under calculus, this is everything under algebra but this is very broad and not helpful of a statement. Or I could tell you that this is “integrals”, this is “derivatives”, this is whatever.
The more nuanced perspective is helpful and I believe Grokking has that - not to just generalize to just “arrays”, and “graphs”, but the actual specific sub-pattern implementations that utilize those data structures.
I think this is most noticeable where if you do Leetcode, let’s say for a week or a month, you might think of problems as distinct from one another, trying to “memoize” the solution for all the problems. Versus Grokking, the idea becomes “what is the pattern”, “how to apply this pattern”, “how to extend from this pattern”.
Third how does this compare against…
Neetcode
Cracking the Coding Interview
Blind75
Leetcode
Algoexpert
More…
Okay, so I’ll reiterate, my opinion is that all of these other resources tend to focus more on “data structures” versus pattern. Their explanation might be better, for example, Neetcode got amazing explanations. But the problem is their course tends to be broken down much more (generally) into broader data structures such as tree, graphs, arrays, so on, versus like the different utilization of BFS, flood-fill, sliding window, topological sort, so-on.
Versus Grokking the Coding interview does so! So my opinion is that these are great SUPPLEMENTAL RESOURCES, b/c Grokking is by no means PERFECT, but Grokking is overall the best in my opinion.
Personally for me, I used to study 5 days grokking, 1-2 days a different resource such as Algoexpert, Neetcode, Leetcode. Adjust as you see fit for whatever you find appropriate to push your boundary.
Grokking serves as a core practice, while other resources can challenge you in terms of new problems, patterns, methodology. I wouldn’t go beyond two resources at any given time though, just because you begin to jump around too much.
Fourth… HUGE NOTE!! How many questions / sections per day?
Just need to emphasize this again, Grokking is not perfect. I definitely know for some people at first it can be overwhelming especially if you are not familiar with coding in your language of choice, or know some data structure basics such as arrays and time / space complexity. I recommend to try their free problems that are available to get a sense of it.
But anyways, with that said, how many questions should you do per day for Grokking? Let’s say that a section has about 10 to 12 problems. I tend to do about 2-3 problems a day, spending about 2-4 hours studying. Sometimes I do more, sometimes I do less, but with my mentees who I previously taught directly, what we do is:
We read the problem
We take 5-10 minutes to think about our thoughts - if we think we know it we try to code it out
We then read the solution
Try to code it out after knowing the solution
Try to then understand / explain it
Try to code it out ourselves
Try to understand for #6 what did we miss if anything, write down some basic notes
Make a note of what we learnt by verbally talking, try to code it again maybe with just basic notes for reference. (No code for notes however. The challenge here is trying to relay back our words to code.)
If we continue to struggle make a note to revisit this in the future.
Every 2-3 sections, we revisit the challenge problems or a particular problem in the section that we had a problem with.
I do recommend when studying, always think about when you always think about “how would you go about re-finding the solution” if you forgot it. And applying the framework below. Maybe you don’t need to do it for every problem, but at least the challenge problems per section is a great place to take the time to do it.
I do recommend don’t make it about the number of problems you solve - unless you are just really slow. Personally, when I studied with my first mentee we study 2 hours, break for 30 mins to an hour, study 2 hours.
This is just so that we were putting in the time in uninterrupted longer session, but also letting our brain then recover with some bantering and exploration of other topics, before going back to studying.
Repetition and Learning - why you need time!
The other thing is it is super normal as the study video talks about, that you will lose about 50% to 80% of the information you study after a day. This is why repetitive learning is important, b/c after you lose let’s say 50% knowledge, you then build up step by step.
So the nice thing is let’s say you do 3 problems in a section for Grokking for a day, even though you will forget parts of it tomorrow, you reinforce it by doing more problems in the same section the next day, and so on.
Then every 3 sections or so, you can do the challenge problems as a sort-of “review”.
So the idea of learning is it is okay to forget information, we just need to iterate to build it back up, make the encoding/decoding of knowledge stronger + then use analysis to rediscover any remaining information we might have forgotten!
Be okay with forgetting it is super normal! And I wish that we move away from the idea of “just remember leetcode problem” and move on, and focus on building this iterative process over time.
Grokking Sections in the Order I recommend it:
So I’m going to propose in my opinion, your “bang for bucks chapters”. This is really focused on “CRAM” style studying, where your time is limited, how much should you study. Obviously, you may disagree with me, you might want to do more or less, so-on. What I say is not end-all-be-all, I’m just giving you my opinion cause I have many people I taught in the past, where time is of the essence.
Section 1: (70% of what you need to know)
This section covers what I believe are is 70% of what you need to know for interview - arrays, strings, trees/graphs. This tends to have huge overlap across all problems you study.
Introduction / Warmup
Two pointers
Sliding Window
Merge Intervals
Stacks
Monotonic Stacks
Hashmap
Breath First Search
Depth First Search
Backtracking
Graphs
Number of Islands
Greedy algorithm
Section 2 (20% more)
Section 2 is what I believe are more advanced patterns that are still great to learn. From pointers, reverse linkedlist, heaps, subsets, binary search, so on, these are definitely still very common patterns that come up.
Fast and Slow pointer (nice to have, but never really had this come up)
In place reverse of a LinkedList
Two Heaps
Subsets
Modified Binary Search
Top K
K way merge
Trie
Topological Sort
Ordered Set
Section 3 (8%)
These are certainly more rare problems, that are a more good to know. I wouldn’t say these would ever make or break you though, and rarely come up.
Cyclic Sort
Union Find
Ordered Set
Prefix Sum
Section 4: (2%)
Almost useless to learn. DP is great as an introduction to understand, but I wouldn’t overemphasize on this. Bitwise, has never come up for me (for OA or live interviews) practically useless but an (?) interesting thing for some people.
Dynamic Programming (introduction to DP could be helpful)
Bitwise (almost useless)
HelloInterview!
HelloInterview seems like a new great resource. It seems to follow closely to Grokking paradigms, with just as great of visuals (if not in some cases I argue better). While I think Grokking is more “comprehensive”, I think for the core mechanics of studying, HelloInterview on my brief look through it, looks just as great.
Sections are well subdivided, organized, explained well. I think the only part I would change is push Dynamic Programming to the bottom of the ordering they have, but otherwise I don’t have large complaints with their ordering.
Great guide!