A couple of months ago, I decided to quit my job as the Director of Engineering at a startup and focus my time and energy on landing a job at Facebook in three months. Recently, I accepted the offer for a Software Engineering position at Facebook. In this post, I will explain the process I took to prepare for my interviews.
There is no doubt that the technical interviews are stressful but having a solid process helps the candidate to mitigate and manage their stress level.
The interview process in big companies is comprised of having one or two phone interviews in the beginning. If everything goes well, they will invite you for the final on-site interview. Getting an offer depends on the cumulative performance for all these interviews.
Choose a language
The big tech companies will not get pedantic on the language that you decide to use in your interviews.
I also spent a couple of hours reading Python Glossary. That made me familiar with the terminology used in the Python community.
Making a weekly/daily plan
Bootstrapping a project is the hardest part. To overcome that, it’s recommended to come up with a weekly plan. The weekly plans are less granular than the daily ones; they let you see the big picture and fail fast. After making my weekly plans, I came up with more detailed daily to-do items.
A page of my notebook dedicated to DDIA book
Do yourself a favor and take notes of the topics you are studying. During this time, you will be covering so many different subjects and being a human being guarantees that you will be forgetting the majority of them; so take notes and review them once in a while. Your notes are also a valuable resource for the next time that you are preparing for the interviews. The notes belong to you, so feel free to get creative and make them less dull.
What and how to study?
I started studying with having the following items in my reading list:
Introduction to Algorithms (CLRS)
Programming Pearls (PP)
Introduction to Algorithms serves as an introductory textbook to algorithms. I had read it back in college but I needed to refresh my memory so I decided to study it first.
Here is the daily plan that I used to study the CLRS book:
Day 1 — CLRS (ch 2, 3)
Day 2 — CLRS (ch 4)
Day 3 — CLRS (ch 5)
Day 4 — CLRS (ch 6, 7)
Day 5 — CLRS (ch 8, 9)
Day 6 — CLRS (ch 10, 11, 12)
Day 7 — CLRS (ch 13, 14)
Day 8 — CLRS (ch 15)
Day 9 — CLRS (ch 16)
Day 10 — CLRS (ch 17)
Day 11 — CLRS (ch 18, 19, 20, 21)
Day 12 — CLRS (ch 22, 23, 24, 25, 26)
Day 13 — CLRS (ch 27, 28, 29, 30) (Optional)
Day 14 — CLRS (ch 31, 32) (Optional)
Day 15 — CLRS (ch 33, 34) (Optional)
Day 16 — CLRS (ch 35) (Optional)
For the most part, I stuck to my plan but they were days that I fell behind. Don’t feel bad if that happens, just notice it fast and try to adjust your plan.
After studying CLRS, I decided to prepare my mind for solving questions. Based on my previous research, one of the books that help you think in an algorithmic way is classic Programming Pearls. Some people call that book archaic and futile, but I can’t disagree more. There are a lot of valuable insights packed in such a small book. I had Programming Pearls in my reading list for a long time, but I never got a chance to go through it. Preparing for the interviews finally gave me the chance to read it. I studied it based on the following plan:
Day 17 — PP (columns 1, 2, 3)
Day 18 — PP (columns 4, 5, 6)
Day 19 — PP (columns 7, 8, 9)
Day 20 — PP (columns 10, 11, 12)
Day 21 — PP (columns 13, 14, 15)
When studying CLRS or PP, it’s very important to solve the exercises at the end of each chapter. That will definitely help you to solidify what you have learned into your brain.
After studying CLRS and PP, you should have a good grasp of the following topics:
Stacks and Queues
Binary Search Trees
The next book I studied was “Elements of Programming Interviews In Python”. The reason I chose EPIP over CTCI (Cracking the coding interview) is that EPIP uses Python and in my opinion, it has a better set of questions.
My initial plan was to study one chapter per day. That included solving all the questions presented in that chapter. I timeboxed myself to one hour per question. If I wasn’t able to solve it, I’d come back to it the next day. If on the second day, I couldn’t make a progress on the question, I’d sneak a peek at the answer. I would make sure that I’m understanding the solution and not just memorizing it.
Besides studying one chapter of EPIP per day, I also started reading Designing Data-Intensive Applications (DDIA). This book provides you with a lot of useful materials that are handy in System Design interviews. I had already studied half of the book and had taken notes; so I just ended up working through the second half and studying my notes from the first half:
Day 22 — DDIA (Studying my notes for chapters 1 to 6.)
Day 23 — DDIA (ch. 7)
Day 24 — DDIA (ch. 8)
Day 25 — DDIA (ch. 9)
Day 26 — DDIA (ch. 10)
Day 27 — DDIA (ch. 11)
Day 28 — DDIA (ch. 12)
Most candidates spend a lot of time preparing for coding interviews and they neglect the system design preparation. Studying DDIA put me on the right track for my system design interviews.
Another great source of study for design interviews is “System Design Primer”. It teaches you the foundation of designing large-scale systems and it also includes Anki flashcards (Disclaimer: I didn’t use the flashcards so I’m not sure about the quality).
System Design Interviews
To prepare yourself for system design interviews, take a look at any system and service that you use and ask yourself this question: If I was going to build this system, how would I do it? Try to come up with answers to that question. Later, try to validate your answers to make sure your solution is scalable. You could also use mock interviews to get yourself comfortable with system design questions. I didn’t use any for my preparation but I know of some companies that offer system design mock interviews.
As a starting point try to design the following services:
URL Shortener like bit.ly
Facebook News Feed
Put the name of your favorite service here
As mentioned before DDIA and System Design Primer are great resources to study to nail your next system design interview.
Besides studying EPIP thoroughly, try to solve as many questions as possible. You could use either of HackerRank or LeetCode. Solving more questions will train your mind and will make you prepare for your actual coding interviews. My favorite approach was to start with easy questions, find my way gradually to medium questions and in the end, work through the hard ones. Some people prefer to start with hard questions but I don’t recommend that. Starting with easy questions will help you build confidence as you progress. During my studies, I solved close to 180 easy questions, 200 medium ones and 60 hard problems on LeetCode. Make sure you are timeboxing each question and are not lingering too much on a single problem.
Define a goal for yourself and then strive toward that goal. What I described in this post was my methodical approach to preparing for my Facebook technical interviews. Your journey could be a little bit different, so feel free to adjust my plans for your own taste.