Interview Experience

This post is to encourage people who have dreamed of something and doubted its possibility

SDE Coding Interview Preparation Roadmap


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.

FB Map

Facebook AR/VR division office. There are two more Facebook offices in London.

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:

  1. Design an existing product like WhatsApp, Facebook, Google search, etc.

  2. Design a particular feature of one of these applications; say, implement a timeline in a Facebook app.

  3. 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.



Insights and My Experience From My Interview at Google




Cracking Google Interview starting from scratch!

Many people have a hunch about their college and feel they might not get recognized, not being from a top tier university. I assure you that insecurity would go away once you read through the blog!

Google values problem-solving abilities and attitude above everything else including your college.

Being honest towards the goal and putting in sincere efforts is the best and the only way to achieve it. Software engineering interviews at Google mostly revolve around data structures and algorithms, so we’re going to discuss that in detail.

I’ve broken down the preparation one goes through in 4 stages, start reading from the section that resonates the most with you.

STAGE 1:

If you haven’t selected a programming language OR have chosen it in the near past then read along.

You can choose any language C++, Java, Python, etc. If you're absolutely new I'll recommend starting with C++. If you have chosen a language don't worry since the target is to get good in one language, you can later learn other languages according to your requirements since it's not a hard task picking up a new lang if you have a grasp on some other.
Once you've chosen a language, try going through language-specific training on platforms like Solve C++ Code Challenges. You should complete at least 70% of the questionnaire before proceeding, which is around 30 problems.

Now start giving contests on platforms like codeforces, codechef, hackerearth. For codeforces you would be starting in division 2(div2), try to participate in as many live and virtual contests you can. Once you feel comfortable in solving div2 A and B problems every time and C sometimes, proceed to the next stage.

STAGE 2:

If you are able to always solve div2 B and sometimes div2 C(during the contest) read along:

Start solving div2 C (only) from all the previous contests. You'll encounter topics like graphs, dynamic programming, number theory. Soak the concepts in as you go. The strategy here would be to try for at least 15 minutes on a problem. Only if you don't get any clue proceed to the solution. Read it once, twice, thrice.. till it makes sense and study the related algorithms. Now write the code yourself without referring to other's code. Continue doing that till you're able to do at least div2 (A, B, C) everytime during the contest. Once you're done with this, move on to the next stage.

STAGE 3:

If you are able to always solve div2 C and sometimes div2 D (during the contest) read along:
Try the above approach now with div2 D problems. You'll encounter trickier problems with a wide variety of concepts coupled together.

STAGE 4:

If you are able to always solve div2 C and majority times div2 D say at least 7 out of 10 times, kudos! It means you have a strong grasp of language and have great algorithmic and data structure concepts. You should try to give contests Google holds yearly like Kickstart and CodeJam. If you do good in it, there is a high chance you could get a call from the recruiter!

Once you feel comfortable at stage 3 or are at 4, try for the job postings on the career page or referrals from your friends. Read interview experiences and past asked problems from interview preparation sites. You won't get any repeated questions but you'll get an idea what they're looking for 😃.



End note

I never expected switching jobs to be this difficult. Those of you who are struggling with it, I can relate to the frustration. Things don’t always go as planned, and there is the role of chance or luck in the interview process. A Sanskrit quote from the Bhagavad Gita that keeps me sane in such times:


Gita

You have the right to work only, but never to its fruits. Let not the fruits of action be your motive, nor let your attachment be to inaction.




Gita