Insights and My Experience From My Interview at Facebook
A Shot in the Dark
Tip: LinkedIn is a great platform to land recruiter calls, but it
does require
persistence. Do not hesitate to reach out to strangers. I heard back from recruiters of
companies like Amazon, Microsoft, Snapchat, Bloomberg,
and Apple simply by sending a message. Luckily, an email I sent in August landed me a recruiter
call from Facebook.
Tip: Getting the first recruiter call is the most time-consuming part of a job
hunt. Start applying for open positions despite feeling unprepared. You can ask your recruiter
for months-long preparation time before scheduling
your first interview.
Gotta Nail It
I scheduled my technical screen two weeks later. The interview format is to solve
two questions
within 45 minutes. The questions were basic and easy to code (array and string problem). One
topic I want to touch on right now is the
test run.
Test Run: Your code is not compiled and executed in the interview. Hence, for
verification, the interviewer asks to take test input and show how it would run through your
code.
Tip: A test run is a good way to debug your code during an interview. Be sure
to include test runs in your interview preparation.
For the interviewer’s second question, I thought of two solutions and explained both to the
interviewer. He then asked me to compare the solutions and analyse the advantages of one over
the other. Five minutes are reserved at the end
to ask questions of the interviewer. I don’t think these five minutes contribute to the
candidate’s performance evaluation, so there’s nothing to worry about.
Tip: Leetcode is
known to be a really good website to prepare for interviews, and I back this. One lesser-known
gem on Leetcode
is Leetcode Discuss. People share their interview experiences (and
questions) on this page, and believe me, questions do repeat.
Onsite Interview
Facebook’s interview process is pretty quick. I heard back from the recruiter within two days and flew to London for my onsite round. A total of four interviews were scheduled.
Coding interviews (x 2)
Two questions are asked which need to be solved within 45–50 minutes. Areas covered were
binary trees, string, stack, and list. Discuss the solution first with the interviewer and then
write your code on the whiteboard.
Tip: There are always edge cases that need to be tackled in the code, and it’s
not easy to take care of them while coding under pressure. One technique that has helped me get
through this is the test run. Immediately after
coding the solution, I tell the interviewer that I am going to test-run my solution on a generic
example and debug myself first.
The obvious mistakes in code are brought out by the first test run itself — better to find
them yourself than to have them pointed out by the interviewer. Running through these test runs
provides the time to think about edge cases
which can then be incorporated into the code.
System design interview
This is an interesting round new for entry-level software engineers. The aim is to design a
system from scratch. The problem statement usually looks like this:
-
Design an existing product like WhatsApp, Facebook, Google search, etc.
-
Design a particular feature of one of these applications; say, implement a timeline in a Facebook app.
-
Design a completely hypothetical scenario; say, create a system to store logs of three servers situated far apart.
This interview definitely requires a special kind of preparation, and the most famous
aid is Grokking
the System Design Interview.
The good part is there are no correct answers. You should be able to justify your design
choices and know the tradeoffs you have made.
Behavioral interview
This is the easiest of all, but do not take it
lightly because any red flags raised in this interview can cost you your selection. The
questions revolve around non-technical experiences like leadership
skills, team spirit, how you tackle disagreement, etc. This set of questions is almost fixed,
hence answers can be prepared.
Tip: A day before the interview, go through the list of popular behavioral
questions and think about anecdotes from your professional life that support your answer to the
question. Use this interview to relax in between
the series of technical interviews. The confidence boost from this round helps in raising
morale.
Insights
These are the insights I gained from the experience and the feedback.
-
The system design round is the decider. It’s really important to present your ideas in a structured way and not miss out design details like database schema, protocol definition, etc. (refer to these points from Grokking the System Design Interview.). Take the initiative and drive the discussion in a logical manner, from collecting requirements to high-level design to discussing pros and cons.
-
Facebook expects candidates to excel at algorithm. They look for small mistakes and even optimizations, say, traversing the array twice instead of once. Try to give your best and do not feel complacent at any point. Do test runs, discuss edge cases, try to optimize, and be quick to write on the whiteboard. Not much of an expectation, is it? On the positive side, I felt all the questions had a beautifully simple solution which was neither hard to come up nor to code.
Tip: Important sections to practice for the system design interview are: gathering requirements, defining protocol, high-level design, database schema, data size estimation, component design, and tradeoffs.