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

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 appeared for an interview 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 appeared for an interview 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

Facebook interview questions for designations

 Software Developer Intern

 (2)

 Developer

 (1)

 Software Engineer

 (6)

 Java Developer

 (1)

 Senior Software Engineer

 (2)

 Associate Software Engineer

 (1)

 Software Development Engineer

 (1)

 Android App Developer

 (1)

I appeared for an interview 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...

  • Ans. 

    Find the K closest points to the origin in a 2-D plane using Euclidean Distance.

    • Calculate the Euclidean Distance of each point from the origin

    • Sort the points based on their distances

    • Return the first K points as the closest neighbors

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

  • Ans. 

    Generate the power set of a sorted array of integers with individually sorted subsets.

    • Use recursion to generate all possible subsets by including or excluding each element in the array.

    • Sort each subset before adding it to the power set.

    • Handle base cases for empty array and single element array.

    • Ensure the subsets are unique by using a set data structure.

    • Time complexity can be exponential due to the nature of generating

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

  • Ans. 

    Convert a Roman numeral string to its integer equivalent.

    • Create a mapping of Roman numeral symbols to their integer values.

    • Iterate through the input string and add the corresponding integer values.

    • Handle cases where subtraction is needed (e.g., IV = 4, IX = 9).

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

    Find pairs of elements in an array that sum up to a given value, sorted in a specific order.

    • Iterate through the array and for each element, check if the complement (S - current element) exists in a hash set.

    • If the complement exists, add the pair to the result list.

    • Sort the result list based on the criteria mentioned in the question.

    • Return the sorted list of pairs.

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

  • Ans. 

    Evaluate arithmetic expressions in infix notation with given operators and precedence rules.

    • Parse the infix expression to postfix using a stack.

    • Evaluate the postfix expression using a stack.

    • Handle operator precedence and parentheses while evaluating.

    • Ensure no division by zero cases and operands fit in 32-bit integer.

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

  • Ans. 

    Remove duplicates from a sorted array in-place with O(1) extra memory.

    • Use two pointers - one for iterating through the array and another for placing unique elements.

    • Compare current element with next element to identify duplicates and skip them.

    • Update array in-place by moving unique elements to the front.

    • Return the length of the array after removal of duplicates.

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

    Facebook stores likes and dislikes using a combination of databases and algorithms.

    • Likes and dislikes are stored in databases such as MySQL or Cassandra.

    • Algorithms are used to analyze user behavior and recommend content based on likes and dislikes.

    • User interactions with posts, pages, and ads are tracked to determine likes and dislikes.

    • Likes and dislikes may also be used to personalize the user's feed and target ads mor

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

    Facebook implements graph search using a graph database to efficiently search for connections between users and their interests.

    • Facebook uses a graph database to store connections between users, pages, groups, etc.

    • The graph search algorithm traverses the graph to find relevant connections based on user queries.

    • It takes into account factors like user relationships, interests, and interactions to provide personalized sea

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

    Hadoop is a framework for distributed storage and processing of large data sets.

    • Hadoop is used for storing and processing big data across a distributed network of computers.

    • It is based on the MapReduce programming model, which allows for parallel processing of data.

    • Hadoop consists of HDFS for storage and YARN for resource management.

    • It is used for tasks like data warehousing, log processing, recommendation systems, and...

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

    Facebook Chat works by using a combination of websockets, long polling, and push technology to deliver real-time messaging.

    • Facebook Chat uses websockets for real-time communication between the client and server.

    • Long polling is used to check for new messages when websockets are not supported.

    • Push technology is used to notify users of new messages even when the chat window is not open.

    • Messages are stored in a database an...

  • 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 - 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

I appeared for an interview 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

I applied via Campus Placement

Interview Preparation Tips

Round: Resume Shortlist
Experience: They selected 10 students from our college from CS and IT .They are looking for guys with extra projects done during college .App development will be a bonus ,contribution to open source and competitive programming will help for shortlisting.
Some of my friends had research papers published and they too got selected.

Round: Test
Experience: Have to write code snippet for 4 questions in 45 minutes
1.Difference between hour hand and minute hand
2.longest palindromic sub string.
3.Product Array puzzle
4.Some question related to matrix

Tips: All question were from geeksforgeeks
So practice it well ..u will make through it

Round: Test
Experience: Long Discussion on projects
They will scan each and every line of your Resume ,so dont write bullshits..
I wrote about interest in AI and got screwed..Discussion on college projects and final year project.
Then asked me to design a snake and ladder game OOPS concepts
Told me to find sum of all elements of sub matrix..(hint pre-processing the matrix)
Asked me about sessions and cookies
Gave a query to write on database indexing (dont remember exactly)
Asked me the code of the difference between hour hand and minute hand and extended it wid the second hand
Asked me as how to implement a dictionary
asked about TRIES ,CODE SNIPPET ON THE SHARED DOCS
One of my friend was asked to implement (set) of STL
Tips: The interviewer was cool guy..helped me a lot always made me comfortable.Interact with them as much as possible

Round: Test
Experience: Wid the CTO of the company .
Started wid the projects again .ACID properties,Database transactions,Concurrency Control
Optimization in database.
Then he asked me to code a function
Given a hash function applied on letters of English words ,un-hash it.Took me 45 minutes to reach the solution ,he helped me a lot.
Asked me to write the code for diameter of a binary tree
Asked me write the code for Boolean Matrix
One of my friend was asked to a question in which there was a bug in a m*n matrix and we have to find the bug(hint dfs or bfs)
Tips: keep calm ,,just keep talking ad he will help u a lot...

Round: HR
Experience: This was the toughest round for me...I had cleared all the rounds but they rejected me in the HR round ,,,dont know where I screwed..Learn every thing of Zomato..
They offered me an internship and thereafter they would look to give a PPO ...!!!lets see what happens

Skills: Coding Skills And Knowledge On Data Structures
Duration: 3
College Name: NIT Srinagar

Interview Questionnaire 

9 Questions

  • Q1. Write a regex for email validation?
  • Ans. 

    Regex for email validation

    • Start with a string of characters followed by @ symbol

    • Followed by a string of characters and a period

    • End with a string of characters with a length of 2-6 characters

    • Allow for optional subdomains separated by periods

    • Disallow special characters except for . and _ in username

  • Answered by AI
  • Q2. Parse the XML? and store the output in JSON. Discussed different approaches?
  • Q3. Print prime numbers in a given range and optimize the solution?
  • Ans. 

    Print prime numbers in a given range and optimize the solution.

    • Use Sieve of Eratosthenes algorithm to generate prime numbers efficiently

    • Start with a boolean array of size n+1, mark all as true

    • Loop through the array and mark all multiples of each prime as false

    • Print all the indexes that are still marked as true

  • Answered by AI
  • Q4. Puzzle – 25 horses – 5 lanes, find fastest 3 horses?
  • Q5. Web related questions on Sessions and cookies?
  • Q6. A lot of discussion on my resume, experience etc
  • Q7. Find angle between hour hand and minute hand in clock if time is given? Write a program or pseudo code?
  • Ans. 

    Find angle between hour and minute hand in a clock given the time.

    • Calculate the angle made by the hour hand with respect to 12 o'clock position

    • Calculate the angle made by the minute hand with respect to 12 o'clock position

    • Find the difference between the two angles and take the absolute value

    • If the angle is greater than 180 degrees, subtract it from 360 degrees to get the smaller angle

  • Answered by AI
  • Q8. A hash function was written to convert a string into a hash. Write a un-hash function to revert it(from hash to string)?
  • Ans. 

    To un-hash a string, use a reverse algorithm to convert the hash back to the original string.

    • Create a reverse algorithm that takes the hash as input and outputs the original string

    • Use the same logic as the hash function but in reverse order

    • If the hash function used a specific algorithm, use the inverse of that algorithm to un-hash the string

  • Answered by AI
  • Q9. He discussed about expectations and role. Asked me if I have any questions. He said to me “yaha aana hai to marwani padegi. tyar ho”? I smiled and asked what are the work timings? He said 9-9 and I was kin...

Interview Preparation Tips

General Tips: I applied through a recruiter. Then I got a call from Zomato HR. It was for LAMP developer profile. She asked me about my profile and also shared some expectations from the role. She asked me to come for F2F rounds to take the process further
Skills: Web development, JSON, Algorithm
College Name: na
Motivation: Overall process was not very tough. But they have start up culture. People work their for 11-12 hours a day. Sometimes on Saturday as well. So people who are geeks or have nothing in life to do except their job can go and join

Skills evaluated in this interview

I appeared for an interview before Sep 2016.

Interview Questionnaire 

5 Questions

  • Q1. Search an element in sorted rotated array.
  • Ans. 

    Search an element in sorted rotated 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 the cases where the target element is at the pivot point or not present in the array.

  • Answered by AI
  • Q2. Kth largest element in an array.
  • Ans. 

    Find the Kth largest element in an array.

    • Sort the array in descending order and return the element at index K-1.

    • Use a max heap to find the Kth largest element efficiently.

    • Implement a quickselect algorithm to find the Kth largest element in linear time.

  • Answered by AI
  • Q3. Reverse a linked list in group of n element.
  • Ans. 

    Reverse a linked list in groups of n elements.

    • Divide the linked list into groups of n elements.

    • Reverse each group individually.

    • Connect the reversed groups to form the final linked list.

    • Handle cases where the number of elements is not a multiple of n.

    • Example: 1->2->3->4->5->6->7->8, n=3 -> 3->2->1->6->5->4->8->7

  • Answered by AI
  • Q4. Median of two sorted array.
  • Ans. 

    Find the median of two sorted arrays.

    • Merge the two arrays into one sorted array and find the median.

    • Use binary search to find the median in O(log(min(m, n))) time complexity.

    • Handle edge cases like empty arrays or arrays of different lengths.

  • Answered by AI
  • Q5. It was a DP question. In a matrix, I have to count number of paths from (0, 0) to (m, n) while crossing through some indexes were not allowed.
  • Ans. 

    Count number of paths from (0, 0) to (m, n) in a matrix while crossing through some indexes were not allowed.

    • Use dynamic programming to solve the problem

    • Create a 2D array to store the number of paths

    • Traverse the matrix and update the array based on the allowed paths

    • Return the value at the last index of the array

  • Answered by AI

Interview Preparation Tips

Round: Technical Interview
Experience: Interviewer was mainly focused on problem solving skill.

College Name: KIIT University

Skills evaluated in this interview

I appeared for an interview in Aug 2017.

Interview Preparation Tips

Round: Test
Experience: Platform: Hackerearth
20 MCQs with negative marking, topics included OS, DS-Algo, Networking.
2 Programming Problems.
Duration: 1 hour 30 minutes
Total Questions: 22

Round: Technical Interview
Experience: 3 DS-Algo problems were asked. Made to written codes on paper.

Round: Technical Interview
Experience: 2 DS-Algo problems were asked. Made to written codes on paper.
Few OS questions were also asked.

Skills: Data Structures and Algorithms, Operating Systems
College Name: IIT (BHU)

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.

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 21 salaries
₹20.8 L/yr - ₹28.5 L/yr
194% 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
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
20 salaries
unlock blur

₹27.3 L/yr - ₹72.5 L/yr

Data Scientist
19 salaries
unlock blur

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