Upload Button Icon Add office photos

Facebook

Compare button icon Compare button icon Compare

Filter interviews by

Facebook Interview Questions, Process, and Tips

Updated 15 Jan 2025

Top Facebook Interview Questions and Answers

  • Q1. Saving Money Problem Statement Ninja is adventurous and loves traveling while being mindful of his expenses. Given a set of 'N' stations connected by 'M' trains, each tr ...read more
    asked in Software Developer interview
  • Q2. Given a hashmap M which is a mapping of characters to arrays of substitute characters, and an input string S, return an array of all possible mutations of S (where any ch ...read more
    asked in SDE interview
  • Q3. Given an “id” and a function getFriends(id) to get the list of friends of that person id, write a function that returns the list of “friends of friends” in the order of d ...read more
    asked in Software Engineer interview
View all 67 questions

Facebook Interview Experiences

Popular Designations

52 interviews found

Interview Preparation Tips

Round: Resume Shortlist
Experience: You need to submit your CV and they shortlist you on this basis.Fast and accurate coding.
Tips: Clearly specify any technical achievement.

Round: Coding
Experience: You are given 4 hours to solve a few algorithmic questions.Start practicing for this from sometime earlier.
Tips: There are puzzles available on the Facebook page.

Round: Technical Interview
Experience: Three interviews. All almost exclusively technical with 1-2 HR questions.
The questions are mainly algorithmic in nature and you need to code online while talking to them.
Tips: Be as accurate and clean with your code as possible.

General Tips: Be creative while answering the questions. They might ask you questions like 'What changes would you want to make to Facebook?'.
Prepare algorithmic questions for the interviews. Most companies like Facebook, Google, Microsoft and others focus on this.
Technical projects or internships will be beneficial.
Qualifying for or winning programming contests like overnite is very beneficial. Involvement in Social/Cultural activities or sports is not really essential.
Skill Tips: Being good at writing fast and correct code in any language helps a lot.
Skills: Programming
College Name: IIT KHARAGPUR

Top Facebook Software Engineer Interview Questions and Answers

Q1. Given an “id” and a function getFriends(id) to get the list of friends of that person id, write a function that returns the list of “friends of friends” in the order of decreasing number of mutual friends, as in friend recommendations. Thes... read more
View answer (1)

Software Engineer Interview Questions asked at other Companies

Q1. Bridge and torch problem : Four people come to a river in the night. There is a narrow bridge, but it can only hold two people at a time. They have one torch and, because it's night, the torch has to be used when crossing the bridge. Person... read more
View answer (208)

Interview Questionnaire 

8 Questions

  • Q1. Given two “ids” and a function getFriends(id) to get the list of friends of that person id, write a function that returns the list of mutual friends
  • Ans. 

    Function to return mutual friends given two ids and getFriends(id) function

    • Call getFriends(id) for both ids to get their respective friend lists

    • Iterate through both lists and compare to find mutual friends

    • Return the list of mutual friends

  • Answered by AI
  • Q2. Given an “id” and a function getFriends(id) to get the list of friends of that person id, write a function that returns the list of “friends of friends” in the order of decreasing number of mutual friends,...
  • Ans. 

    Function to return list of friends of friends in decreasing order of mutual friends

    • Use a set to store all friends of friends

    • Iterate through the list of friends of the given id

    • For each friend, iterate through their list of friends and count mutual friends

    • Sort the set of friends of friends by decreasing number of mutual friends

  • Answered by AI
  • Q3. Given a number of time slots – start time and end time,“a b”, find any specific time with the maximum number of overlapping. After solving the problem I had to prove my solution
  • Ans. 

    Given time slots, find a specific time with maximum overlap. Prove solution.

    • Create a list of all start and end times

    • Sort the list in ascending order

    • Iterate through the list and keep track of the number of overlaps at each time

    • Return the time with the maximum number of overlaps

    • Prove solution by testing with different input sizes and edge cases

  • Answered by AI
  • Q4. Given an array of Integers, find the Longest sub-array whose elements are in Increasing Order
  • Ans. 

    Find the longest sub-array with increasing order of integers.

    • Iterate through the array and keep track of the current sub-array's start and end indices.

    • Update the start index whenever the current element is smaller than the previous element.

    • Update the end index whenever the current element is greater than or equal to the next element.

    • Calculate the length of the sub-array and compare it with the longest sub-array found s

  • Answered by AI
  • Q5. Given an array of Integers, find the length of Longest Increasing Subsequence and print the sequence.
  • Ans. 

    Find the length of longest increasing subsequence and print the sequence from an array of integers.

    • Use dynamic programming to solve the problem

    • Create an array to store the length of longest increasing subsequence ending at each index

    • Traverse the array and update the length of longest increasing subsequence for each index

    • Print the sequence by backtracking from the index with the maximum length

    • Time complexity: O(n^2)

    • Exam...

  • Answered by AI
  • Q6. Given a Sorted Array which has been rotated, write the code to find a given Integer
  • Ans. 

    Code to find a given integer in a rotated sorted array.

    • Use binary search to find the pivot point where the array is rotated.

    • Divide the array into two subarrays and perform binary search on the appropriate subarray.

    • Handle edge cases such as the target integer not being present in the array.

  • Answered by AI
  • Q7. You have a number of incoming Integers, all of which cannot be stored into memory. We need to print largest K numbers at the end of input
  • Ans. 

    Use a min-heap to keep track of the largest K numbers seen so far.

    • Create a min-heap of size K.

    • For each incoming integer, add it to the heap if it's larger than the smallest element in the heap.

    • If the heap size exceeds K, remove the smallest element.

    • At the end, the heap will contain the largest K numbers in the input.

  • Answered by AI
  • Q8. Implement LRU Cache
  • Ans. 

    LRU Cache is a data structure that stores the most recently used items and discards the least recently used items.

    • Use a doubly linked list to keep track of the order of items in the cache

    • Use a hash map to store the key-value pairs for fast access

    • When an item is accessed, move it to the front of the linked list

    • When the cache is full, remove the least recently used item from the back of the linked list and the hash map

  • Answered by AI

Interview Preparation Tips

Round: ONLINE CODING ROUND
Experience: Facebook visited our campus in July, 2012. We had an online coding round hosted on InterviewStreet. We were asked to solve just one problem. The given problem boils down to : Given a undirected graph, source and destination, write the code to find the total number of distinct nodes visited, considering all possible paths.
Tips: Those shortlisted had to fly to Delhi for a Personal Interview. There were four rounds of interview, each of 45 minutes. The questions were simple. But just solving the given problem wasn't enough.

There was much more interaction and short questions asked related to the problem

Round: Technical Interview
Experience: The above mentioned questions wer asked in the interview. For every solution I was asked to write the code on paper. The code should also include the implementation of the data structures used (I used heaps - so I was asked to implement heaps ). They are looking for someone with good problem solving skills and conceptually sound in data structures

College Name: BIT MESRA

Skills evaluated in this interview

Top Facebook Software Engineer Interview Questions and Answers

Q1. Given an “id” and a function getFriends(id) to get the list of friends of that person id, write a function that returns the list of “friends of friends” in the order of decreasing number of mutual friends, as in friend recommendations. Thes... read more
View answer (1)

Software Engineer Interview Questions asked at other Companies

Q1. Bridge and torch problem : Four people come to a river in the night. There is a narrow bridge, but it can only hold two people at a time. They have one torch and, because it's night, the torch has to be used when crossing the bridge. Person... read more
View answer (208)

Jobs at Facebook

View all

Facebook Interview FAQs

How many rounds are there in Facebook interview?
Facebook interview process usually has 2-3 rounds. The most common rounds in the Facebook interview process are Technical, Coding Test and One-on-one Round.
How to prepare for Facebook interview?
Go through your CV in detail and study all the technologies mentioned in your CV. Prepare at least two technologies or languages in depth if you are appearing for a technical interview at Facebook. The most common topics and skills that interviewers at Facebook expect are Basic, Management, Analytical, Consulting and Product Management.
What are the top questions asked in Facebook interview?

Some of the top questions asked at the Facebook interview -

  1. Given an “id” and a function getFriends(id) to get the list of friends of t...read more
  2. Given a hashmap M which is a mapping of characters to arrays of substitute char...read more
  3. Given a list of integer numbers, a list of symbols [+,-,*,/] and a target numbe...read more
How long is the Facebook interview process?

The duration of Facebook interview process can vary, but typically it takes about 2-4 weeks to complete.

Tell us how to improve this page.

Facebook Interview Process

based on 34 interviews

Interview experience

4.4
  
Good
View more

Interview Questions from Similar Companies

Amazon Interview Questions
4.1
 • 5k Interviews
Google Interview Questions
4.4
 • 830 Interviews
Swiggy Interview Questions
3.8
 • 428 Interviews
LinkedIn Interview Questions
4.3
 • 65 Interviews
TikTok Interview Questions
4.0
 • 23 Interviews
YouTube Interview Questions
4.5
 • 9 Interviews
Twitter Interview Questions
4.1
 • 5 Interviews
Instagram Interview Questions
4.6
 • 5 Interviews
Pinterest Interview Questions
4.8
 • 3 Interviews
Snap Inc Interview Questions
2.4
 • 2 Interviews
View all

Facebook Reviews and Ratings

based on 162 reviews

4.3/5

Rating in categories

4.2

Skill development

4.3

Work-life balance

4.5

Salary

4.0

Job security

4.4

Company culture

4.1

Promotions

4.2

Work satisfaction

Explore 162 Reviews and Ratings
Software Engineer - AI Transport

Bangalore / Bengaluru

0-5 Yrs

Not Disclosed

Software Engineer - Host networking

Bangalore / Bengaluru

1-4 Yrs

Not Disclosed

ASIC Design Engineer

Bangalore / Bengaluru

2-6 Yrs

Not Disclosed

Explore more jobs
Software Engineer
75 salaries
unlock blur

₹46.7 L/yr - ₹102 L/yr

Software Developer
21 salaries
unlock blur

₹20.8 L/yr - ₹28.5 L/yr

Senior Software Engineer
19 salaries
unlock blur

₹15.4 L/yr - ₹63 L/yr

Data Scientist
18 salaries
unlock blur

₹57.3 L/yr - ₹156 L/yr

Manager
15 salaries
unlock blur

₹21 L/yr - ₹80 L/yr

Explore more salaries
Compare Facebook with

Google

4.4
Compare

Amazon

4.1
Compare

Apple

4.3
Compare

eBay

3.8
Compare
Did you find this page helpful?
Yes No
write
Share an Interview