Filter interviews by
I applied via LinkedIn and was interviewed in Jul 2024. There was 1 interview round.
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...
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
DSA round was there it was good
I was interviewed in Jul 2021.
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 .
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...
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 ...
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...
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...
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.
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 ...
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
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...
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...
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 .
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...
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
The goal is to construct a binary tree from given preorder and inorder traversal lists of the tree nodes.
preorder = [1, 2, ...
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
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...
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.
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...
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...
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.
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.
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.
I was interviewed before Dec 2020.
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.
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...
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...
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...
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...
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 .
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...
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...
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...
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 .
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...
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...
Given a rotated sorted array ARR
of size 'N' and an integer 'K', determine the index at which 'K' is present in the array.
1. If 'K' is not present...
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...
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 .
Given an array of integers ARR
and an integer K
, determine the rank of the element ARR[K]
.
The rank of any element in ARR
is defined as the number of elem...
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 :
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...
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...
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.
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.
Facebook interview questions for designations
I was interviewed before Dec 2020.
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 .
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...
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 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 .
Convert a string representing a Roman numeral into its integer equivalent and return the result.
Roman numerals are represented by seven different symbol...
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'.
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.
You are provided with a string expression
consisting of characters '+', '-', '*', '/', '(', ')' and digits '0' to '9', representing an arithmetic express...
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 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 .
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.
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.
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.
Get interview-ready with Top Facebook Interview Questions
Top trending discussions
I applied via Company Website and was interviewed in Nov 2024. There was 1 interview round.
Amazon offers challenging projects, innovative technologies, and a collaborative work environment.
Opportunity to work on cutting-edge projects like Amazon Web Services (AWS) or Alexa
Access to vast resources and tools for development
Collaborative work culture that encourages learning and growth
Opportunity to impact millions of customers worldwide
Competitive compensation and benefits package
I want to work at Amazon because of their innovative culture, vast resources, and opportunities for growth.
Amazon is known for its innovative culture and cutting-edge technology.
They have vast resources and a global reach, providing opportunities to work on impactful projects.
Amazon offers great career growth and development opportunities for software developers.
I admire Amazon's customer-centric approach and focus on
My strengths include problem-solving skills and attention to detail. My weakness is sometimes being too critical of my own work.
Strengths: problem-solving skills
Strengths: attention to detail
Weakness: being too critical of my own work
I would solve the problem by breaking it down into smaller tasks, analyzing requirements, designing a solution, coding, testing, and debugging.
Analyze requirements thoroughly before starting the development process
Break down the problem into smaller tasks to make it more manageable
Design a solution architecture that meets the requirements and is scalable
Code the solution using best practices and coding standards
Test th...
Short term goals focus on immediate tasks and objectives, while long-term goals involve strategic planning and growth.
Short term goals may include completing a specific project, improving team communication, or implementing a new software feature.
Long-term goals could involve expanding the team, increasing market share, or developing new products or services.
Short term goals help keep the team focused and motivated, wh...
BFS Implementation of a jug question.
It was a medium-level DSA round
This was also a DSA round
This again a DSA round
I applied via Company Website and was interviewed in Dec 2024. There was 1 interview round.
DSA Problem statement of Trie
based on 3 interviews
1 Interview rounds
based on 8 reviews
Rating in categories
Software Engineer
73
salaries
| ₹47.1 L/yr - ₹102.7 L/yr |
Software Developer
19
salaries
| ₹32.6 L/yr - ₹59.5 L/yr |
Senior Software Engineer
19
salaries
| ₹15.4 L/yr - ₹63 L/yr |
Data Scientist
17
salaries
| ₹59.9 L/yr - ₹150 L/yr |
Manager
15
salaries
| ₹21 L/yr - ₹80 L/yr |
Amazon
Apple
eBay