Image
Arslan Ahmad

Facebook Software Engineer Interview Handbook

Learn what it’s like to interview at Facebook in 2023 as a software engineer.

Image

In this comprehensive handbook, you will discover exactly what to expect during the Facebook interview process. You will also find details on how to answer some of the most commonly asked Facebook questions.

Let’s take your interview to the next level!

Facebook salary structure in the US

Here are average salaries for software engineers at Facebook in the US:

  • SDE (E3): 186K
  • SDE (E4): 267K
  • Sr. SDE (E5): 385K
Image
Facebook Salaries (ref: levels.fyi)

Facebook interview process

Here is what to expect in a Facebook interview for a software engineer:

◈ Recruiter pre-screen (20–30 mins)

Initial screening based on resume. Questions related to your professional experience, noteworthy projects, and accomplishments. No coding.

◈ Technical phone interview (45–60 mins)

You will solve a coding question using an online editor. Your interviewer might ask you a follow-up question or add constraints to the current problem. Common topics include data structures, algorithms, and time/space complexity.

◈ Onsite loop (4–5 interviews)

Coding, design, and behavioral questions.

  • Ninja (coding, 2 interviews): 1–2 coding questions solved on a whiteboard in 45 mins.

  • Pirate (design, 2 interviews): Collaborative discussion with the interviewer. Drawing on a whiteboard to solve a system design question. Junior engineers don’t get any design interviews.

  • Jedi (behavioral): Questions about your motivation, people interactions, challenges, and work ethics.

◈ Lunch

It’s not an interview. The interviewer will show you around and have lunch with you.

Interview tips

  1. Data Structures — Practice data structures like Heaps, HashTable, Tree, LinkedList, Stack, Queue, and Graph.

  2. Algorithm — Practice recursion, Merge-Sort, Quick-Sort, Breadth-first search, Depth-first search, Divide and Conquer, and Dynamic Programming

  3. Explain your thought process — Extremely important. Practice describing your solution and design decisions clearly and concisely.

  4. Collaborate — Don’t forget to discuss, present multiple solutions, and take hints from the interviewer.

Top coding patterns for Facebook

  1. Two Heaps (link)

  2. Sliding Window (link)

  3. Merge Intervals (link)

  4. Tree Breadth First Search (link)

  5. K-way Merge (link)

Top recent Facebook tagged coding questions on LeetCode

Here are the top coding questions:

1. Right View of a Binary Tree (link)

Statement: Given a binary tree, return an array containing nodes in its right view. The right view of a binary tree is the set of nodes visible when the tree is seen from the right side.

2. Merge ‘K’ Sorted Lists (link)

Statement: Given an array of ‘K’ sorted LinkedLists, merge them into one sorted list.

Statement: Implement an iterator for the in-order traversal of a binary search tree (BST). That is, given a BST, we need to implement two functions:

  • bool haNext(): Returns true if at least one element is left in the in-order traversal of the BST.

  • int next(): Return the next element in the in-order traversal of the BST

4. Sum of Path Numbers (link)

Statement: Given a binary tree where each node can only have a digit (0–9) value, each root-to-leaf path will represent a number. Find the total sum of all the numbers represented by all paths.

5. Merge Intervals (link)

Statement: Given a list of intervals, merge all the overlapping intervals to produce a list that has only mutually exclusive intervals.

6. Diameter of a Binary Tree (link)

Statement: Given a binary tree, find the length of its diameter. The diameter of a tree is the number of nodes on the longest path between any two leaf nodes. The diameter of a tree may or may not pass through the root.

7. Sliding Window Median (link)

Statement: Given an array of numbers and a number ‘k’, find the median of all the ‘k’ sized sub-arrays (or windows) of the array.

8. Kth Smallest Number in a Sorted Matrix (link)

Statement: Given an N∗N matrix where each row and column is sorted in ascending order, find the Kth smallest element in the matrix.

9. Equal Subset Sum Partition (link)

Statement: Given a set of positive numbers, find if we can partition it into two subsets such that the sum of elements in both subsets is equal.

10. Alien dictionary (link)

Statement: There is a dictionary containing words from an alien language for which we don’t know the ordering of the letters. Write a method to find the correct order of the letters in the alien language. It is given that the input is a valid dictionary and there exists an ordering among its letters.

Top FB system design questions

Here are the top system design questions:

  1. Design Facebook Newsfeed (link)

  2. Design Facebook Messenger (link)

  3. Design Instagram (link)

  4. Design Facebook Status Search (link)

  5. Design Nearby Friends (link)

Top FB behavioral interview questions

Here are the top 7 behavioral questions for which you must prepare a good answer/story:

  1. Tell me about something you’ve done that you’re proud of.

  2. Tell me about a recent/interesting project you worked on.

  3. How have you demonstrated leadership when you weren’t the manager?

  4. What is your favorite Facebook product, and how would you improve it?

  5. How do you like to give and receive feedback?

  6. Tell me about a time you took leadership in a task you were not expected to.

  7. What were some excellent collaborations you've had?

Happy Interviewing 🚀

Reference

Get instant access to all current and upcoming courses through subscription.
$19
.50
/mo
billed yearly ($234)
Recommended Course
Join our Newsletter
Read More