Facebook senior software engineer interview: the only post you’ll need to read
I have been working at Facebook as a software engineer for a while now. During this time, I have got different inquiries from friends and strangers alike on landing a senior engineering position at Facebook. This post will explain the process that could help you achieve your dream job at Facebook or any other FANG company. It will explain the steps I took before applying for a job at Facebook.
Disclaimer: This is the path I personally took before my Facebook interviews. Most of the materials I’m mentioning here are optional. I went through them because I wasn’t in a rush. My goal was not to land a job at a FANG company but learn in the process.
There is no doubt that the technical interviews are stressful, but having a robust 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. The on-site interview has multiple components: 1) Behavioral section 2) coding parts 3) system/product design interviews. Getting an offer depends on the cumulative performance of all these interviews. I won’t focus on the behavioral components here in the interest of time, as there are excellent resources on the web explaining that section in detail.
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.
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 forget 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)
- Designing Data-Intensive Applications (DDIA)
- Elements of Programming Interviews in Python (EPIP)
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. Note, that you won’t need to go through CLRS to be succesful in your interview. I just read it because I remember liking it in college.
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 algorithmically 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 essential to solve some of the exercises at the end of each chapter. That will 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:
- Primitive Types
- Linked Lists
- Stacks and Queues
- Binary Trees
- Binary Search Trees
- Dynamic Programming
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 weren’t able to solve it, I’d come back to it the next day. If, on the second day, I couldn’t make 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 reviewing 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
- Twitter Search
- Facebook News Feed
- Whatsapp/Facebook Messenger
- Typeahead Suggestion
- 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 problems will train your mind and will make you prepare for your actual coding interviews. My 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. Make sure you are timeboxing each question and are not lingering too much on a single problem.
Applying for senior engineering positions (>E4) in FANG companies is one of the best ways to get into them. Most of these companies have solid internship programs, and almost all E3 (entry-level) positions are offered to returning interns. To have a successful senior engineering interview, define a goal for yourself, and then strive toward that. What I described in this post was my systematic approach to preparing for my Facebook technical interviews. Your journey could be different, so feel free to adjust my plans for your taste.