Upload Button Icon Add office photos

Facebook

Compare button icon Compare button icon Compare

Filter interviews by

Facebook Software Developer Interview Questions, Process, and Tips for Freshers

Updated 30 Oct 2024

Top Facebook Software Developer Interview Questions and Answers for Freshers

  • 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 f ...read more
  • 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 ...read more
  • Q3. 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' ...read more
View all 8 questions

Facebook Software Developer Interview Experiences for Freshers

2 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

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. 

    Calculate the total number of distinct paths from a given source node to all other nodes in a directed graph.

    • Use dynamic programming to keep track of the number of paths from the source node to each node in the graph.

    • Consider using modular arithmetic to handle large numbers and prevent overflow.

    • Start by initializing the number of paths from the source node to itself as 1.

    • Iterate through the edges of the graph and updat...

  • Answered by AI
  • 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. 

    Given courses with prerequisites, determine a valid order to complete all courses.

    • Use topological sorting to find a valid order of courses.

    • Create a graph with courses as nodes and prerequisites as edges.

    • Start with courses that have no prerequisites and remove them from the graph.

    • Continue this process until all courses are taken or there are no valid courses left.

    • If there is a cycle in the graph, it is impossible to com

  • Answered by AI
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. 

    Merge overlapping intervals and return sorted list of merged intervals.

    • Sort the intervals based on start times.

    • Iterate through intervals and merge overlapping intervals.

    • Return the merged intervals in sorted order.

  • Answered by AI
  • 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. 

    Find the length of the longest path from a source cell to a destination cell in a binary matrix.

    • Use depth-first search (DFS) to explore all possible paths from source to destination.

    • Keep track of visited cells to avoid revisiting them.

    • Return the length of the longest path found, or -1 if no path exists.

  • Answered by AI
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. 

    Find the length of the longest strictly increasing subsequence in an array of integers.

    • Use dynamic programming to solve this problem efficiently.

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

    • Iterate through the array and update the length of the longest increasing subsequence for each element.

    • Return the maximum value in the array as the result.

  • Answered by AI
  • 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. 

    Given a rotated sorted array, find the index of a given integer 'K'.

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

    • Then perform binary search on the appropriate half of the array to find 'K'.

    • Handle cases where 'K' is not present in the array by returning -1.

  • Answered by AI
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. 

    Given an array and an index, find the number of elements smaller than the element at that index appearing before it in the array.

    • Iterate through the array up to index K and count the number of elements smaller than ARR[K].

    • Return the count as the rank of ARR[K].

    • Handle edge cases like empty array or invalid index K.

  • Answered by AI
  • 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. 

    Design a Least Recently Used (LRU) cache data structure that supports get and put operations with capacity constraint.

    • Implement a doubly linked list to maintain the order of recently used keys.

    • Use a hashmap to store key-value pairs for quick access.

    • Update the order of keys in the linked list on get and put operations.

    • Evict the least recently used key when the cache reaches its capacity.

  • 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

Software Developer Interview Questions Asked at Other Companies for undefined

asked in Amazon
Q1. Maximum Subarray Sum Problem Statement Given an array of integers ... read more
Q2. Find Duplicate in Array Problem Statement You are provided with a ... read more
Q3. Validate Binary Tree Nodes Problem You are provided with 'N' bina ... read more
asked in Nagarro
Q4. Crazy Numbers Pattern Challenge Ninja enjoys arranging numbers in ... read more
asked in Mr Cooper
Q5. Connect Ropes Problem Statement Given a number of ropes denoted a ... read more

Interview questions from similar companies

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

I applied via LinkedIn and was interviewed in May 2024. There were 2 interview rounds.

Round 1 - HR 

(1 Question)

  • Q1. How did you know about this job?
Round 2 - Technical 

(1 Question)

  • Q1. Talking about my experience

I was interviewed in Jan 2021.

Round 1 - Coding Test 

(2 Questions)

Round duration - 90 minutes
Round difficulty - Hard

Online coding round , 2-3 questions. Level - med-hard

  • Q1. 

    Fibonacci Number Verification

    Identify if the provided integer 'N' is a Fibonacci number.

    A number is termed as a Fibonacci number if it appears in the Fibonacci sequence, where each number is the sum of...

  • Ans. 

    Check if a given number is a Fibonacci number or not.

    • Iterate through the Fibonacci sequence until you find a number greater than or equal to the given number.

    • Check if the given number matches the Fibonacci number found in the sequence.

    • If the given number matches, output 'YES'; otherwise, output 'NO'.

  • Answered by AI
  • Q2. 

    Break The Board Problem Statement

    Your task is to break a board of given dimensions 'L' by 'W' into 'L' * 'W' smaller squares, ensuring the total cost of breaking is minimized.

    Input:

    The first line con...
  • Ans. 

    Minimize cost of breaking a board into smaller squares by optimizing horizontal and vertical cuts.

    • Iterate through all possible horizontal and vertical cuts to find the minimum cost

    • Use dynamic programming to store and reuse subproblem solutions

    • Calculate the cost of breaking the board into smaller squares based on the given dimensions and cut costs

  • Answered by AI
Round 2 - Telephonic Call 

(1 Question)

Round duration - 60 Minutes
Round difficulty - Medium

2 interviewers , coding problem, no compilation.

  • Q1. 

    Minimum Number Of People To Teach

    Ninja has started a social networking site called Ninjas Space. The platform consists of ‘N’ users and supports ‘M’ different languages. Users communicate if they know at...

  • Ans. 

    Determine the minimum number of users to teach a common language so all friends can communicate on a social networking site.

    • Create a graph where users are nodes and friendships are edges.

    • Find connected components in the graph.

    • For each connected component, determine the minimum number of users to teach a common language.

    • Return the sum of minimum users needed for all connected components.

  • Answered by AI
Round 3 - Face to Face 

Round duration - 40 minutes
Round difficulty - Medium

CS fundamentals. Tough round. 40 mins interview. 1 interviewer from USA

Round 4 - Face to Face 

(1 Question)

Round duration - 40 minutes
Round difficulty - Hard

System Design Problem

  • Q1. Design a Facebook-like application.
  • Ans. 

    Design a Facebook-like application for social networking.

    • User profiles with personal information and photos

    • News feed displaying posts from friends

    • Ability to like, comment, and share posts

    • Friend requests and messaging functionality

    • Groups and events for community engagement

  • Answered by AI

Interview Preparation Tips

Professional and academic backgroundI completed Software Engineering from Delhi Technological University. I applied for the job as SDE - 1 in BangaloreEligibility criteriaComputer related BranchTwitter interview preparation:Topics to prepare for the interview - DBMS, Data Structures and Algorithms , OOP, Maths puzzles, Aptitude , CN, OSTime required to prepare for the interview - 9 MonthsInterview preparation tips for other job seekers

Tip 1 : Never leave any topic from any chapter / Subject
Tip 2 : Learn to explain your thoughts well
Tip 3 : Learn from previous experiences / interviews / problems asked.
Tip 4 : Atleast 4 projects in Resume

Application resume tips for other job seekers

Tip 1 : Atleast 4 projects on Resume
Tip 2 : Do not write false things. You always get caught. Be genuine.

Final outcome of the interviewRejected

Skills evaluated in this interview

Interview experience
4
Good
Difficulty level
Hard
Process Duration
Less than 2 weeks
Result
No response

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

Round 1 - Coding Test 

Leetcode similar coding tests

Round 2 - One-on-one 

(2 Questions)

  • Q1. How do you test the feasibility of an idea?
  • Q2. Explain the process of calling an API

Interview Preparation Tips

Interview preparation tips for other job seekers - Practice leetcode and review basic SWE interview questions
Interview experience
4
Good
Difficulty level
Moderate
Process Duration
Less than 2 weeks
Result
Not Selected

I applied via Company Website and was interviewed in Nov 2023. There was 1 interview round.

Round 1 - Coding Test 

1 hour, 2 question. 1. Meetting scheduler (leetcode)

Interview experience
5
Excellent
Difficulty level
-
Process Duration
-
Result
-
Round 1 - Aptitude Test 

Few aptitude questions were asked in the interview

Round 2 - Coding Test 

Reverse string without doing anything to special characters

I was interviewed before Sep 2020.

Round 1 - Coding Test 

(1 Question)

Round duration - 90 minutes
Round difficulty - Easy

This was MCQ+Coding round.

  • Q1. How can you check if two strings are anagrams of each other?
  • Ans. 

    Check if two strings are anagrams by comparing the sorted versions of the strings.

    • Sort both strings and compare if they are equal.

    • Use a hashmap to store the frequency of characters in each string and compare the maps.

    • Ignore spaces and punctuation when comparing the strings.

  • Answered by AI
Round 2 - Face to Face 

Round duration - 90 minutes
Round difficulty - Easy

This was face to face interview round.

Round 3 - Face to Face 

Round duration - 90 minutes
Round difficulty - Easy

This was face to face interview round.

Interview Preparation Tips

Professional and academic backgroundI completed Computer Science Engineering from National Institute Of Technology, Silchar, Assam. I applied for the job as SDE - 1 in SiddharthnagarEligibility criteria6 CGPAAmazon interview preparation:Topics to prepare for the interview - Basic Computer Science backgroundTime required to prepare for the interview - 6 monthsInterview preparation tips for other job seekers

Tip 1 : Participate in live contests on websites like Codechef, Codeforces etc as much as possible.
Tip 2 : Practice previous interview questions from LeetCode, GeeksForGeeks.
Tip 3 : Revise Computer Science subjects like DBMS, OOPS thoroughly.

Application resume tips for other job seekers

Add projects and Internships if you have done any and add only those things which you really know.

Final outcome of the interviewSelected

Skills evaluated in this interview

I was interviewed before Sep 2020.

Round 1 - Coding Test 

(1 Question)

Round duration - 90 Minutes
Round difficulty - Medium

Interview started at 11:00 am. It was an online round. During the coding round I submitted optimized solution and got full acceptance of the solutions.

  • Q1. 

    Detect Cycle in a Directed Graph

    You are provided with a directed graph composed of 'N' nodes. You have a matrix called 'EDGES' with dimensions M x 2, which specifies the 'M' edges in the graph. Each edge...

  • Ans. 

    Detect cycle in a directed graph using depth-first search (DFS) algorithm.

    • Use DFS to traverse the graph and detect back edges indicating a cycle.

    • Maintain a visited array to keep track of visited nodes during traversal.

    • If a node is visited again during traversal and it is not the parent node, then a cycle exists.

    • Return true if a cycle is detected, false otherwise.

  • Answered by AI
Round 2 - Face to Face 

(1 Question)

Round duration - 80 Minutes
Round difficulty - Medium

Interview started at 10:00 am. Interview went well, I was able to connect with the interviewer and enjoyed the whole interview

  • Q1. 

    Next Smallest Palindrome Problem Statement

    Find the next smallest palindrome strictly greater than a given number 'N' represented as a string 'S'.

    Explanation:

    You are given a number in string format, a...

  • Ans. 

    Find the next smallest palindrome greater than a given number represented as a string.

    • Convert the string to an integer, find the next greater palindrome, and convert it back to a string.

    • Handle cases where the number is a palindrome or has all digits as '9'.

    • Consider both odd and even length numbers when finding the next palindrome.

  • Answered by AI
Round 3 - Face to Face 

(1 Question)

Round duration - 80 Minutes
Round difficulty - Medium

Interview started at 11:00 am. Interview went well.

  • Q1. 

    Boundary Traversal of a Binary Tree

    Given a binary tree of integers, your task is to return the boundary nodes of the tree in Anti-Clockwise direction starting from the root node.

    Input:

    The first line ...
  • Ans. 

    Return the boundary nodes of a binary tree in Anti-Clockwise direction starting from the root node.

    • Traverse the left boundary nodes in a top-down manner

    • Traverse the leaf nodes from left to right

    • Traverse the right boundary nodes in a bottom-up manner

    • Handle cases where duplicates occur in the boundary nodes

    • Implement the function without printing as printing is already managed

  • Answered by AI

Interview Preparation Tips

Eligibility criteriaGood knowledge of Data Structures, Some great projects which are used by the usersAmazon interview preparation:Topics to prepare for the interview - Data Structures, Web development, System Design, Algorithms, Dynamic Programming, Database, OS, Networking, OOPS, DevOpsTime required to prepare for the interview - 8 monthsInterview preparation tips for other job seekers

Tip 1 : For Data Structures number of questions doesn't matter. Try to understand the logic behind them and try to apply them in creating multiple scenario's. Learn them by heart. 
Tip 2 : For Web.Development Try to learn full stack development. See which part interests you more, Increase your knowledge horizon, Always try to build a system a system considering It will be served to millions of customers. By doing this 1-2 projects will increase and cover all the major things which one should learn in their career/college.

Application resume tips for other job seekers

Tip 1 : Always try to make it a single page 
Tip 2 : Always make resume company specific. eg. Data Structures part more if you are applying for MNC's eg. Amazon, Google, DE Shaw, browserstack.

Final outcome of the interviewSelected

Skills evaluated in this interview

I was interviewed in Aug 2017.

Interview Questionnaire 

7 Questions

  • Q1. Implement Merge Sort.
  • Ans. 

    Merge Sort is a divide and conquer algorithm that sorts an array by dividing it into two halves, sorting them separately, and then merging the sorted halves.

    • Divide the array into two halves

    • Recursively sort the two halves

    • Merge the sorted halves

  • Answered by AI
  • Q2. Given a BST containing distinct integers, and a number ‘X’, find all pairs of integers in the BST whose sum is equal to ‘X’.
  • Ans. 

    Find pairs of integers in a BST whose sum is equal to a given number.

    • Traverse the BST and store the values in a hash set.

    • For each node, check if (X - node.value) exists in the hash set.

    • If yes, add the pair (node.value, X - node.value) to the result.

    • Continue traversal until all nodes are processed.

  • Answered by AI
  • Q3. Given a set of time intervals in any order, merge all overlapping intervals into one and output the result which should have only mutually exclusive intervals.
  • Ans. 

    Merge overlapping time intervals into mutually exclusive intervals.

    • Sort the intervals based on their start time.

    • Iterate through the intervals and merge overlapping intervals.

    • Output the mutually exclusive intervals.

    • Example: [(1,3), (2,6), (8,10), (15,18)] -> [(1,6), (8,10), (15,18)]

  • Answered by AI
  • Q4. What are the different types of hashing? Suggest an alternative and a better way for Linear Chaining.
  • Ans. 

    Different types of hashing and alternative for Linear Chaining

    • Different types of hashing include division, multiplication, and universal hashing

    • Alternative for Linear Chaining is Open Addressing

    • Open Addressing includes Linear Probing, Quadratic Probing, and Double Hashing

  • Answered by AI
  • Q5. Implement AVL Tree.
  • Ans. 

    An AVL tree is a self-balancing binary search tree where the heights of the left and right subtrees differ by at most one.

    • AVL tree is a binary search tree with additional balance factor for each node.

    • The balance factor is the difference between the heights of the left and right subtrees.

    • Insertion and deletion operations in AVL tree maintain the balance factor to ensure the tree remains balanced.

    • Rotations are performed ...

  • Answered by AI
  • Q6. Minimum number of squares whose sum equals to given number n.
  • Ans. 

    Find the minimum number of squares whose sum equals to a given number n.

    • Use dynamic programming to solve the problem efficiently.

    • Start with finding the square root of n and check if it is a perfect square.

    • If not, then try to find the minimum number of squares required for the remaining number.

    • Repeat the process until the remaining number becomes 0.

    • Return the minimum number of squares required for the given number n.

  • Answered by AI
  • Q7. Insertion sort for a singly linked list.
  • Ans. 

    Insertion sort for a singly linked list.

    • Traverse the list and compare each node with the previous nodes

    • If the current node is smaller, swap it with the previous node

    • Repeat until the end of the list is reached

    • Time complexity is O(n^2)

  • Answered by AI

Interview Preparation Tips

Round: Test
Experience: There were 2 coding questions (no penalty for wrong submission) and 20 Multiple Choice Questions(with negative marking). We were given 90 minutes to solve them. MCQs were based on Data Structures, OS, CN, C outputs, OOP etc.
Tips: Experience in Competitive Programming might help in solving coding questions. No constraints were mentioned and detailed Instructions related to problem were stated vaguely. So code carefully.
Duration: 1 hour 30 minutes
Total Questions: 22

Round: Technical Interview
Experience: The interviewer asked me to introduce myself and a brief introduction of the projects that I have done. She first asked me questions related to my project. After that she moved on to the data structures part.
Tips: Take your time to approach the problems and if the question is not clear ask the interviewer to explain it again.

Round: Technical Interview
Experience: The interviewer asked me about how my previous round went. After that, he asked me to introduce myself and a brief introduction of the projects that I have done. He first asked me a few questions related to my project. Then he moved on to the data structures part. In this round the interviewer gave me strict time limit for coding the solution on paper for each problem and as soon as I was done coding he gave me 2-3 minutes every time to find errors and debug my code.
Tips: Do not panic even if the interviewer sets time limit while solving problems. If the question is not clear ask the interviewer to explain it again.

College Name: The LNM Institute Of Information Technology, Jaipur

Skills evaluated in this interview

Facebook Interview FAQs

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

Tell us how to improve this page.

Facebook Software Developer Interview Process for Freshers

based on 1 interview

Interview experience

5
  
Excellent
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

₹0 L/yr - ₹0 L/yr

Software Developer
20 salaries
unlock blur

₹0 L/yr - ₹0 L/yr

Senior Software Engineer
19 salaries
unlock blur

₹0 L/yr - ₹0 L/yr

Data Scientist
17 salaries
unlock blur

₹0 L/yr - ₹0 L/yr

Manager
15 salaries
unlock blur

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