Upload Button Icon Add office photos

Facebook

Compare button icon Compare button icon Compare

Filter interviews by

Clear (1)

Facebook Software Developer Interview Questions, Process, and Tips

Updated 30 Oct 2024

Top Facebook Software Developer 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
  • Q2. Longest Increasing Path in a 2D Matrix Problem Statement Given a matrix of non-negative integers of size 'N x M', where 'N' and 'M' denote the number of rows and columns ...read more
  • Q3. Binary Tree Construction from Preorder and Inorder Traversal The goal is to construct a binary tree from given preorder and inorder traversal lists of the tree nodes. Ex ...read more
View all 25 questions

Facebook Software Developer Interview Experiences

5 interviews found

Interview experience
5
Excellent
Difficulty level
Moderate
Process Duration
2-4 weeks
Result
No response

I applied via LinkedIn and was interviewed in Jul 2024. There was 1 interview round.

Round 1 - HR 

(2 Questions)

  • Q1. Why you want to join facebook?
  • Ans. 

    I want to join Facebook because of its innovative technology, global impact, and opportunities for growth.

    • Innovative technology: Facebook is known for its cutting-edge technology and constant innovation.

    • Global impact: Working at Facebook would allow me to contribute to a platform that connects billions of people worldwide.

    • Opportunities for growth: Facebook offers a dynamic and fast-paced work environment with ample opp...

  • Answered by AI
  • Q2. Whats the best feature you like in Facebook?
  • Ans. 

    I appreciate the personalized news feed feature on Facebook.

    • Personalized news feed shows content based on user interests

    • Helps users stay updated on relevant information

    • Allows users to engage with content they are interested in

  • Answered by AI
Interview experience
5
Excellent
Difficulty level
-
Process Duration
-
Result
-
Round 1 - Coding Test 

DSA round was there it was good

Software Developer Interview Questions Asked at Other Companies

asked in Amazon
Q1. Maximum Subarray Sum Problem Statement Given an array of integers ... read more
asked in Amazon
Q2. Minimum Number of Platforms Needed Problem Statement You are give ... read more
asked in Rakuten
Q3. Merge Two Sorted Arrays Problem Statement Given two sorted intege ... read more
asked in Cognizant
Q4. Nth Fibonacci Number Problem Statement Calculate the Nth term in ... read more
Q5. Find Duplicate in Array Problem Statement You are provided with a ... read more

I was interviewed in Jul 2021.

Round 1 - Coding Test 

(2 Questions)

Round duration - 90 minutes
Round difficulty - Hard

This was an online coding round where we had 2 questions to solve under 90 minutes . Both the questions were preety hard according to me . One has to have a fair share of knowledge in Data Structures and Algorithms to pass this round .

  • Q1. 

    Longest Increasing Path in a 2D Matrix Problem Statement

    Given a matrix of non-negative integers of size 'N x M', where 'N' and 'M' denote the number of rows and columns respectively, find the length of t...

  • Ans. 

    The task is to find the length of the longest increasing path in a 2D matrix, where you can move in four directions: left, right, up, or down from each cell.

    • Traverse the matrix and for each cell, find the longest increasing path starting from that cell

    • Use dynamic programming to store the length of the longest increasing path for each cell

    • Recursively explore all four directions from each cell, checking if the next cell ...

  • Answered by AI
  • Q2. 

    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 train starting from station 'A' and r...

  • Ans. 

    The task is to find the cheapest price from the given source to destination with up to K stops.

    • Read the number of test cases

    • For each test case, read the number of stations and trains

    • Read the details of each train (source, destination, ticket price)

    • Read the source station, destination station, and maximum number of stops

    • Implement a graph data structure to represent the stations and trains

    • Use a modified version of Dijkst...

  • Answered by AI
Round 2 - Video Call 

(2 Questions)

Round duration - 60 Minutes
Round difficulty - Medium

This Round was DS and Algo round and it started with formal introduction, followed by 2 problems. We first dicussed the
approach the time complexity and proper code covering all cases.

  • Q1. 

    K - Sum Path In A Binary Tree

    Given a binary tree where each node contains an integer value, and a value 'K', your task is to find all the paths in the binary tree such that the sum of the node values in ...

  • Ans. 

    The task is to print every path of a binary tree with the sum of nodes in the path as 'K'.

    • Traverse the binary tree and keep track of the current path and its sum

    • At each node, check if the sum of the current path equals 'K'

    • If yes, add the current path to the result

    • Continue traversing the left and right subtrees recursively

    • Remove the current node from the path before backtracking

  • Answered by AI
  • Q2. 

    Combination Sum Problem Statement

    Given an array of distinct positive integers ARR and a non-negative integer 'B', find all unique combinations in the array where the sum is equal to 'B'. Numbers can be c...

  • Ans. 

    The task is to find all unique combinations in an array whose sum is equal to a given target sum.

    • Use backtracking to generate all possible combinations

    • Sort the array in non-decreasing order to ensure elements in each combination are in non-decreasing order

    • Start with an empty combination and iterate through the array, adding each element to the combination and recursively calling the function with the remaining sum

    • If th...

  • Answered by AI
Round 3 - Video Call 

(3 Questions)

Round duration - 50 Minutes
Round difficulty - Medium

This Round was DS/Algo + Core round and it started with formal introduction, followed by 3 problems. We first dicussed
the approach the time complexity and proper code covering all cases for the 2 coding problems . The last question was
related to OS and was a bit theoretical .

  • Q1. 

    Merging Accounts Problem

    Given a list ACCOUNTS where each element consists of a list of strings, with the first element being the name of the account holder, and the subsequent elements being the email ad...

  • Ans. 

    The task is to merge accounts belonging to the same person based on common emails and return the merged accounts.

    • Iterate through each account and create a mapping of emails to account holders

    • Iterate through the mapping and merge accounts with common emails

    • Sort the merged accounts and return the result

  • Answered by AI
  • Q2. 

    Binary Tree Construction from Preorder and Inorder Traversal

    The goal is to construct a binary tree from given preorder and inorder traversal lists of the tree nodes.

    Example:

    Input:
    preorder = [1, 2, ...
  • Ans. 

    The task is to construct a binary tree using the given inorder and preorder traversals.

    • Use the preorder traversal to determine the root of the binary tree

    • Use the inorder traversal to determine the left and right subtrees of the root

    • Recursively construct the left and right subtrees

    • Return the root node of the constructed binary tree

  • Answered by AI
  • Q3. Can you explain the concept of demand paging?
  • Ans. 

    Demand paging is a memory management technique where pages are loaded into memory only when needed.

    • Demand paging allows for efficient memory utilization by loading pages into memory on demand.

    • It reduces the amount of initial memory required to start a process.

    • When a page is needed but not in memory, a page fault occurs and the required page is loaded from disk.

    • Demand paging allows for larger virtual memory space than p...

  • Answered by AI
Round 4 - Video Call 

(3 Questions)

Round duration - 60 minutes
Round difficulty - Medium

This was a preety intense round as I was grilled more on my System Design concepts but eventually I was able to
asnwers all the questions with some help from the interviewer.

General Tip : While preparing for Facebook Interviews , make sure you read and understand some of the most important features that Facebook incorporates like Graph Search , Adding a friend , Removing a friend , Storing Likes/Dislikes and so on. 
All these features are important to learn because at their core they are nothing but Data Structures used and implemented very elegantly . So before your next Facebook interview , do read these topics and be confident about your LLD as well as HLD skills.

  • Q1. How does Facebook store likes and dislikes?
  • Ans. 

    Facebook stores likes/dislikes using a combination of databases and caching systems.

    • Likes/dislikes are stored in a distributed database system like Cassandra or HBase.

    • Each like/dislike is associated with a user and the content being liked/disliked.

    • The database is sharded to handle the large volume of likes/dislikes.

    • Caching systems like Memcached or Redis are used to improve read performance.

    • Likes/dislikes can be stored...

  • Answered by AI
  • Q2. How does Facebook implement graph search?
  • Ans. 

    Facebook implements graph search by indexing user connections and content to enable efficient search queries.

    • Facebook indexes user connections and content to build a graph database.

    • The graph database is used to store and retrieve information about users, their relationships, and their content.

    • Graph search queries are executed by traversing the graph database to find relevant connections and content.

    • Facebook uses variou...

  • Answered by AI
  • Q3. How does Facebook Chat work?
  • Ans. 

    Facebook Chat is a real-time messaging system that allows users to send and receive instant messages.

    • Facebook Chat uses a client-server architecture.

    • It utilizes long polling or WebSockets for real-time communication.

    • Messages are stored in a message queue for delivery.

    • Chat messages are encrypted for security.

    • Facebook Chat supports features like read receipts, typing indicators, and group chats.

  • Answered by AI

Interview Preparation Tips

Eligibility criteriaAbove 7 CGPAFacebook interview preparation:Topics to prepare for the interview - Data Structures, Algorithms, System Design, Aptitude, OOPSTime required to prepare for the interview - 4 MonthsInterview preparation tips for other job seekers

Tip 1 : Must do Previously asked Interview as well as Online Test Questions.
Tip 2 : Go through all the previous interview experiences from Codestudio and Leetcode.
Tip 3 : Do at-least 2 good projects and you must know every bit of them.

Application resume tips for other job seekers

Tip 1 : Have at-least 2 good projects explained in short with all important points covered.
Tip 2 : Every skill must be mentioned.
Tip 3 : Focus on skills, projects and experiences more.

Final outcome of the interviewSelected

Skills evaluated in this interview

I was interviewed before Dec 2020.

Round 1 - Coding Test 

(2 Questions)

Round duration - 90 minutes
Round difficulty - Hard

This was an online coding round where we were supposed to solve 2 questions under 90 minutes . Both the questions in my set were related to Graphs and were quite tricky and heavy to implement.

  • Q1. 

    Path Counting in Directed Graph

    Given a directed graph with a specified number of vertices V and edges E, your task is to calculate the total number of distinct paths from a given source node S to all ot...

  • Ans. 

    Steps: 

    1) Create a recursive function that takes index of node of a graph and the destination index. Keep a global or a static variable count to store the count. Keep a record of the nodes visited in the current path by passing a visited array by value (instead of reference, which would not be limited to the current path).
    2) If the current nodes is the destination increase the count.
    3) Else for all the adjacent no...

  • Answered Anonymously
  • Q2. 

    Course Schedule II Problem Statement

    You are provided with a number of courses 'N', some of which have prerequisites. There is a matrix named 'PREREQUISITES' of size 'M' x 2. This matrix indicates that fo...

  • Ans. 

    Approach : This problem was based on Topological Sorting .

    The first node in the topological ordering will be the node that doesn't have any incoming edges. Essentially, any node that has an in-degree of 0 can start the topologically sorted order. If there are multiple such nodes, their relative order doesn't matter and they can appear in any order.

    Algorithm : 

    1) Initialize a queue, Q to keep a track of all the nod...

  • Answered Anonymously
Round 2 - Face to Face 

(2 Questions)

Round duration - 60 Minutes
Round difficulty - Medium

This was a Data Structures and Algorithms round with some standard questions . I was expected to come up with an
efficient approach and code it as well .

  • Q1. 

    Merge Intervals Problem Statement

    You are provided with 'N' intervals, each containing two integers denoting the start time and end time of the interval.

    Your task is to merge all overlapping intervals a...

  • Ans. 

    Steps : 

    1) First, we sort the list as described. 
    2) Then, we insert the first interval into our merged list and continue considering each interval in turn as follows - 
    2.1) If the current interval begins after the previous interval ends, then they do not overlap and we can 
    append the current interval to merged. 
    2.2) Otherwise, they do overlap, and we merge them by updating the end of the previo...

  • Answered Anonymously
  • Q2. 

    Longest Route Problem Statement

    Given a 2-dimensional binary matrix called Mat of size N x M that consists solely of 0s and 1s, find the length of the longest path from a specified source cell to a destina...

  • Ans. 
    1. The idea is to reduce the problem from finding a path from source to destination to finding a path from some node to destination and building our answer up.
    2. From the current cell, we look if there exists a neighbor from where I can reach the destination if no such neighbor exists we return -1.
    3. Else if a path exists we take the longest path then add 1 in it ( to account for the transition from the current cell to a neighb...
  • Answered Anonymously
Round 3 - Face to Face 

(2 Questions)

Round duration - 50 Minutes
Round difficulty - Medium

This was also a DSA round where I was asked to code only one of the questions but I eventually ended up coding both
as I had some spare time and explained my approches very smoothly to the interviewer . This round went preety well .

  • Q1. 

    Longest Increasing Subsequence Problem Statement

    Given an array of integers with 'N' elements, determine the length of the longest subsequence where each element is greater than the previous element. This...

  • Ans. 

    Approach 1 (Using DP ) :

    This is a classic Dynamic Programming problem.
    Steps : 
    1) Let dp[i] is the longest increase subsequence which ends at nums[i] . 
    2) For every i from 0 to n , traverse backwards from j=i-1 to j=0 and check if nums[i]>nums[j].
    3) If nums[i]>nums[j] , update dp[i]=max(dp[i] , dp[j]+1)
    4) Finally return the maximum element from the DP array

    TC: O(N^2)
    SC: O(N)

    Approach 2 (Using Binary Searc...

  • Answered Anonymously
  • Q2. 

    Search In Rotated Sorted Array Problem Statement

    Given a rotated sorted array ARR of size 'N' and an integer 'K', determine the index at which 'K' is present in the array.

    Note:
    1. If 'K' is not present...
  • Ans. 

    This was a preety standard Binary Search Question and I had solved this question before on platforms like LeetCode and CodeStudio . I was asked this question to test my implementation skills and how well do I handle Edge Cases .

    Approach :
    1) The idea is to find the pivot point, divide the array in two sub-arrays and perform binary search.
    2) The main idea for finding pivot is – for a sorted (in increasing order) and pivo...

  • Answered Anonymously
Round 4 - Face to Face 

(2 Questions)

Round duration - 50 Minutes
Round difficulty - Medium

This was also a DSA round with 2 questions of Medium to Hard difficulty . I was expected to follow some clean code and OOPS principles to write the code in this round .

  • Q1. 

    Rank from Stream Problem Statement

    Given an array of integers ARR and an integer K, determine the rank of the element ARR[K].

    Explanation:

    The rank of any element in ARR is defined as the number of elem...

  • Ans. 

    Step 1- Making the ‘BST’ :

     

    Let insert(TreeNode* <int> ROOT, int VAL) be a function which insert data into ‘BST’.

    Now consider the following steps to implement the function :

    1. If ‘ROOT’ is NULL then make a new Node with data and return it.
    2. If 'VAL' is less than data of ‘ROOT’ then do:
      1. Make a recursive call with the left child of ‘ROOT’ as ‘ROOT’.
      2. Increase the size of the left subtree of ‘ROOT’ by 1.
    3. Otherwise do:
      1. Mak...
  • Answered Anonymously
  • Q2. 

    LRU Cache Design Question

    Design a data structure for a Least Recently Used (LRU) cache that supports the following operations:

    1. get(key) - Return the value of the key if it exists in the cache; otherw...

  • Ans. 

    Approach : 

    Structure of an LRU Cache :

    1) In practice, LRU cache is a kind of Queue — if an element is reaccessed, it goes to the end of the eviction order
    2) This queue will have a specific capacity as the cache has a limited size. Whenever a new element is brought in, it
    is added at the head of the queue. When eviction happens, it happens from the tail of the queue.
    3) Hitting data in the cache must be done in const...

  • Answered Anonymously

Interview Preparation Tips

Eligibility criteriaAbove 7 CGPAFacebook interview preparation:Topics to prepare for the interview - Data Structures, Algorithms, System Design, Aptitude, OOPSTime required to prepare for the interview - 4 MonthsInterview preparation tips for other job seekers

Tip 1 : Must do Previously asked Interview as well as Online Test Questions.
Tip 2 : Go through all the previous interview experiences from Codestudio and Leetcode.
Tip 3 : Do at-least 2 good projects and you must know every bit of them.

Application resume tips for other job seekers

Tip 1 : Have at-least 2 good projects explained in short with all important points covered.
Tip 2 : Every skill must be mentioned.
Tip 3 : Focus on skills, projects and experiences more.

Final outcome of the interviewSelected

Skills evaluated in this interview

Facebook interview questions for designations

 Software Developer Intern

 (2)

 Developer

 (1)

 Software Engineer

 (6)

 Java Developer

 (1)

 Senior Software Engineer

 (2)

 Software Development Engineer

 (1)

 Associate Software Engineer

 (1)

 Android App Developer

 (1)

I was interviewed before Dec 2020.

Round 1 - Face to Face 

(2 Questions)

Round duration - 60 Minutes
Round difficulty - Medium

This was a Data Structures and Algorithms round with preety good questions . I was expected to come up with an efficient approach and code it as well .

  • Q1. 

    K Closest Points to Origin Problem Statement

    Your house is located at the origin (0,0) of a 2-D plane. There are N neighbors living at different points on the plane. Your goal is to visit exactly K neighb...

  • Q2. 

    Power Set Generation

    Given a sorted array of 'N' integers, your task is to generate the power set for this array. Each subset of this power set should be individually sorted.

    A power set of a set 'ARR' i...

Round 2 - Face to Face 

(2 Questions)

Round duration - 50 Minutes
Round difficulty - Hard

This was also a DSA round where I was asked to code only one of the questions but I eventually ended up coding both as I had some spare time and explained my approches very smoothly to the interviewer . This round went preety well .

  • Q1. 

    Roman Numeral to Integer Conversion

    Convert a string representing a Roman numeral into its integer equivalent and return the result.

    Explanation:

    Roman numerals are represented by seven different symbol...

  • Q2. 

    Pair Sum Problem Statement

    You are given an integer array 'ARR' of size 'N' and an integer 'S'. Your task is to find and return a list of all pairs of elements where each sum of a pair equals 'S'.

    Note:
    ...
Round 3 - Face to Face 

(2 Questions)

Round duration - 50 Minutes
Round difficulty - Medium

This was also a DSA round with 2 questions . One was implementation heavy and the other was related to recursion and so I handled it carefully so that my code does not run into TLE or Segmentation Fault.

  • Q1. 

    Arithmetic Expression Evaluation Problem Statement

    You are provided with a string expression consisting of characters '+', '-', '*', '/', '(', ')' and digits '0' to '9', representing an arithmetic express...

  • Q2. 

    Remove Duplicates from Sorted Array Problem Statement

    You are given a sorted integer array ARR of size N. Your task is to remove the duplicates in such a way that each element appears only once. The outpu...

Round 4 - Face to Face 

(2 Questions)

Round duration - 50 Minutes
Round difficulty - Medium

This was a typical System Design round where I was asked about the various features of Facebook and what sort of data structures and algorithms are used in implementing them .

  • Q1. How does Facebook store likes and dislikes?
  • Q2. How does Facebook implement graph search?
Round 5 - Face to Face 

(2 Questions)

Round duration - 50 Minutes
Round difficulty - Medium

This was a preety intense round as I was grilled more on my System Design concepts but eventually I was able to asnwers all the questions with some help from the interviewer.

  • Q1. What is Hadoop and why is it used?
  • Q2. How does Facebook Chat work?

Interview Preparation Tips

Eligibility criteriaAbove 7 CGPAFacebook interview preparation:Topics to prepare for the interview - Data Structures, Algorithms, System Design, Aptitude, OOPSTime required to prepare for the interview - 5 MonthsInterview preparation tips for other job seekers

Tip 1 : Must do Previously asked Interview as well as Online Test Questions.
Tip 2 : Go through all the previous interview experiences from Codestudio and Leetcode.
Tip 3 : Do at-least 2 good projects and you must know every bit of them.

Application resume tips for other job seekers

Tip 1 : Have at-least 2 good projects explained in short with all important points covered.
Tip 2 : Every skill must be mentioned.
Tip 3 : Focus on skills, projects and experiences more.

Final outcome of the interviewSelected

Skills evaluated in this interview

Get interview-ready with Top Facebook Interview Questions

Interview questions from similar companies

Interview experience
2
Poor
Difficulty level
-
Process Duration
-
Result
-
Round 1 - Coding Test 

It was a medium-level DSA round

Round 2 - Coding Test 

This was also a DSA round

Round 3 - Coding Test 

This again a DSA round

Round 4 - Technical 

(1 Question)

  • Q1. Can't disclose the question because of NDA signed but it was a design round
Round 5 - One-on-one 

(1 Question)

  • Q1. This was a project discussion round
Interview experience
4
Good
Difficulty level
Moderate
Process Duration
Less than 2 weeks
Result
-

I applied via Company Website and was interviewed in Sep 2024. There were 2 interview rounds.

Round 1 - Coding Test 

Tree, Graph, dynamic programming

Round 2 - One-on-one 

(1 Question)

  • Q1. Design a parking lot
  • Ans. 

    Design a parking lot with multiple levels and automated ticketing system

    • Include multiple levels for parking spaces

    • Implement automated ticketing system for entry and exit

    • Provide designated spots for disabled parking

    • Incorporate security cameras for surveillance

    • Include payment kiosks for convenient payment options

  • Answered by AI

Skills evaluated in this interview

Interview experience
2
Poor
Difficulty level
-
Process Duration
-
Result
-
Round 1 - Coding Test 

HAckerrank based test

Interview experience
5
Excellent
Difficulty level
Moderate
Process Duration
2-4 weeks
Result
Selected Selected

I was interviewed in May 2024.

Round 1 - Aptitude Test 

It was having english and maths questions

Round 2 - Coding Test 

Code was easy kindly do pratice

Interview experience
2
Poor
Difficulty level
-
Process Duration
-
Result
-
Round 1 - Resume Shortlist 
Pro Tip by AmbitionBox:
Keep your resume crisp and to the point. A recruiter looks at your resume for an average of 6 seconds, make sure to leave the best impression.
View all Resume tips
Round 2 - Aptitude Test 

I haven't appeared but this website asking me everytime that's why giving review but I wanted to know what are the ratings for this company

Round 3 - Technical 

(2 Questions)

  • Q1. I haven't appeared but ratings it
  • Q2. Why you choose uplers

Interview Preparation Tips

Interview preparation tips for other job seekers - Know the procedure before going to assessment, learn all the things before assessment
Contribute & help others!
anonymous
You can choose to be anonymous

Facebook Interview FAQs

How many rounds are there in Facebook Software Developer interview?
Facebook interview process usually has 1 rounds. The most common rounds in the Facebook interview process are HR and Coding Test.

Recently Viewed

JOBS

Browse jobs

Discover jobs you love

JOBS

Browse jobs

Discover jobs you love

INTERVIEWS

Facebook

No Interviews

SALARIES

Cognizant

INTERVIEWS

Facebook

No Interviews

INTERVIEWS

Amazon

No Interviews

SALARIES

IBM

SALARIES

TCS

DESIGNATION

INTERVIEWS

Facebook

No Interviews

Tell us how to improve this page.

Facebook Software Developer Interview Process

based on 3 interviews

1 Interview rounds

  • Coding Test Round
View more
Facebook Software Developer Salary
based on 20 salaries
₹19.3 L/yr - ₹30.8 L/yr
209% more than the average Software Developer Salary in India
View more details

Facebook Software Developer Reviews and Ratings

based on 8 reviews

4.2/5

Rating in categories

4.2

Skill development

4.2

Work-life balance

4.2

Salary

4.1

Job security

4.3

Company culture

4.1

Promotions

4.4

Work satisfaction

Explore 8 Reviews and Ratings
Software Engineer
73 salaries
unlock blur

₹47.1 L/yr - ₹102.7 L/yr

Software Developer
20 salaries
unlock blur

₹19.3 L/yr - ₹30.8 L/yr

Senior Software Engineer
19 salaries
unlock blur

₹15.4 L/yr - ₹63 L/yr

Data Scientist
17 salaries
unlock blur

₹59.9 L/yr - ₹150 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