Filter interviews by
I applied via Job Fair and was interviewed before Mar 2021. There was 1 interview round.
The responsibility for illegal rules lies with the individuals or entities that create and enforce them.
Illegal rules are typically created by individuals or organizations in positions of authority or power.
Government bodies, legislative bodies, or regulatory agencies may be responsible for creating illegal rules.
Enforcement agencies, such as the police or regulatory authorities, may be responsible for enforcing illega...
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.
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.
I was interviewed before Sep 2020.
Round duration - 75 minutes
Round difficulty - Easy
Timing it is around 11 am and Environment is good .
A ninja bird can gather fruits from trees arranged in a circle. Each tree has an associated fruit value. The bird can gather all the fruits from a tree i...
You are given a decimal number 'N'. Your task is to convert this number into a base 58 representation.
The Base58 alphabet is defined by the following characters: “12...
Round duration - 45 mintues
Round difficulty - Medium
Environment was very friendly but questions asked are hard
You are provided with an array ARR
consisting of N
distinct integers in ascending order and an integer TARGET
. Your objective is to count all the distinct pairs in ARR
whose sum...
Given an array or list ARR
consisting of N
integers, your task is to identify all distinct triplets within the array that sum up to a specified number K
.
A t...
Tip 1 : Practice Atleast 500 Questions
Tip 2 : Do atleast 1 good projects
Tip 3 : You should be able to explain your project
Tip 1 : Have some projects on resume.
Tip 2 : Do not put false things on resume.
Facebook interview questions for popular designations
I was interviewed in May 2017.
Dealing with negative feedback and managing a social media crisis
Handling negative comments and reviews on social media platforms
Addressing customer complaints and resolving issues in a timely manner
Managing a social media crisis and developing a crisis communication plan
Monitoring online conversations and sentiment analysis to identify potential issues
Collaborating with cross-functional teams to provide accurate and t...
Social Media Analyst is responsible for monitoring, analyzing, and optimizing social media strategies to increase engagement and reach.
Monitor social media platforms for trends and insights
Analyze data to measure the success of social media campaigns
Optimize content and strategies based on performance metrics
Collaborate with marketing team to align social media efforts with overall goals
Get interview-ready with Top Facebook Interview Questions
Find k closest points to origin from a set of 2D points.
Calculate distance of each point from origin using distance formula
Sort the points based on distance in ascending order
Return first k points from the sorted list
iOS manual memory management requires developers to manually allocate and deallocate memory for objects.
Developers must manually allocate memory for objects using methods like alloc and init.
Developers must also manually deallocate memory for objects using methods like release.
Failure to properly manage memory can lead to memory leaks and crashes.
ARC (Automatic Reference Counting) was introduced in iOS 5 to automate me...
Program to print powerset of a given set
Create an empty list to store subsets
Loop through all possible binary numbers from 0 to 2^n-1 where n is the length of the set
For each binary number, convert it to binary and use the 1's as indices to select elements from the set
Add the selected elements to the list of subsets
Return the list of subsets
Convert Roman numerals to integer in O(n) time
Create a dictionary to map Roman numerals to integers
Iterate through the string from right to left
If the current numeral is less than the previous, subtract it from the total
Else, add it to the total
Return the total
Given a list of numbers and symbols, provide an expression that evaluates to a target number.
Use recursion to try all possible combinations of numbers and symbols
Check for division by zero and negative numbers
Return False if no expression evaluates to the target number
Solve for x in a given expression with single variable.
Simplify the expression by applying the distributive property and combining like terms.
Isolate the variable term on one side of the equation and the constant terms on the other side.
Solve for x by dividing both sides of the equation by the coefficient of the variable term.
Check the solution by substituting the value of x back into the original equation.
In this case...
Given a hashmap M and an input string S, return an array of all possible mutations of S using M's substitutes.
Iterate through each character in S and get its substitutes from M
Use recursion to generate all possible combinations of substitutes for each character
Time complexity: O(n^m) where n is the average number of substitutes per character and m is the length of S
Space complexity: O(n^m) due to the number of possible...
Facebook implements graph search by indexing user data and using natural language processing.
Facebook indexes user data to create a graph of connections and relationships.
Natural language processing is used to interpret user queries and return relevant results.
Graph search allows users to search for specific information within their network, such as 'friends who like hiking'.
Facebook chat is a real-time messaging service that allows users to communicate with each other through the Facebook website or mobile app.
Facebook chat uses XMPP (Extensible Messaging and Presence Protocol) to enable real-time communication between users.
Messages are sent and received through Facebook's servers, which act as intermediaries between users.
Users can see when their friends are online and available to chat...
Facebook stores likes/dislikes as data points in their database.
Likes and dislikes are stored as separate data points.
Each like/dislike is associated with a unique ID for the post or comment.
The data is stored in Facebook's database and can be accessed through their API.
Likes/dislikes can also be used to personalize a user's newsfeed.
Facebook also uses likes/dislikes to gather data for targeted advertising.
Status updates can be implemented through various methods such as push notifications, real-time updates, and periodic polling.
Use push notifications to instantly update users on important changes.
Implement real-time updates using websockets or server-sent events for a seamless user experience.
Periodically poll the server for updates using AJAX or other similar technologies.
Provide a clear and concise interface for user...
A timeline/newsfeed can be implemented using a combination of algorithms and data structures.
Use a database to store user activity data
Implement an algorithm to sort the data by time
Use pagination to limit the number of items displayed at once
Include options for filtering and searching
Consider using caching to improve performance
Adding someone as a friend allows you to connect with them on the platform and see their updates.
When you add someone as a friend, they receive a notification and can choose to accept or decline your request.
Once they accept your request, you can see their updates and they can see yours.
You can also message each other and tag each other in posts.
Adding someone as a friend does not give them access to your personal info...
Hadoop is a distributed computing framework used for storing and processing large datasets.
Hadoop is based on the MapReduce programming model.
It allows for parallel processing of large datasets across multiple nodes.
Hadoop consists of two main components: HDFS for storage and MapReduce for processing.
It is commonly used for big data analytics, machine learning, and data warehousing.
Examples of companies using Hadoop in
FB messages work by allowing users to send and receive text, images, videos, and other media through the Facebook platform.
Messages can be sent to individuals or groups of people.
Users can also send voice messages and make voice and video calls through the messaging feature.
Messages can be archived or deleted, and users can also choose to ignore or block certain senders.
Facebook uses end-to-end encryption to protect th...
FB Mail is a messaging service that allows Facebook users to send and receive messages from other users.
FB Mail is integrated into the Facebook platform and can be accessed through the Messenger app or website.
Users can send messages to individuals or groups, and can also attach files, photos, and videos.
FB Mail also includes features such as message requests, message filtering, and message archiving.
Messages can be se...
Function to return mutual friends given two ids and getFriends(id) function
Call getFriends(id) for both ids to get their respective friend lists
Iterate through both lists and compare to find mutual friends
Return the list of mutual friends
Function to return list of friends of friends in decreasing order of mutual friends
Use a set to store all friends of friends
Iterate through the list of friends of the given id
For each friend, iterate through their list of friends and count mutual friends
Sort the set of friends of friends by decreasing number of mutual friends
Given time slots, find a specific time with maximum overlap. Prove solution.
Create a list of all start and end times
Sort the list in ascending order
Iterate through the list and keep track of the number of overlaps at each time
Return the time with the maximum number of overlaps
Prove solution by testing with different input sizes and edge cases
Find the longest sub-array with increasing order of integers.
Iterate through the array and keep track of the current sub-array's start and end indices.
Update the start index whenever the current element is smaller than the previous element.
Update the end index whenever the current element is greater than or equal to the next element.
Calculate the length of the sub-array and compare it with the longest sub-array found s
Find the length of longest increasing subsequence and print the sequence from an array of integers.
Use dynamic programming to solve the problem
Create an array to store the length of longest increasing subsequence ending at each index
Traverse the array and update the length of longest increasing subsequence for each index
Print the sequence by backtracking from the index with the maximum length
Time complexity: O(n^2)
Exam...
Code to find a given integer in a rotated sorted array.
Use binary search to find the pivot point where the array is rotated.
Divide the array into two subarrays and perform binary search on the appropriate subarray.
Handle edge cases such as the target integer not being present in the array.
Use a min-heap to keep track of the largest K numbers seen so far.
Create a min-heap of size K.
For each incoming integer, add it to the heap if it's larger than the smallest element in the heap.
If the heap size exceeds K, remove the smallest element.
At the end, the heap will contain the largest K numbers in the input.
LRU Cache is a data structure that stores the most recently used items and discards the least recently used items.
Use a doubly linked list to keep track of the order of items in the cache
Use a hash map to store the key-value pairs for fast access
When an item is accessed, move it to the front of the linked list
When the cache is full, remove the least recently used item from the back of the linked list and the hash map
I feel incredibly proud and grateful for achieving this rare feat.
I am overjoyed and humbled by this accomplishment.
It is a testament to my hard work and dedication.
I am grateful for the support of my team and loved ones.
This achievement motivates me to continue striving for excellence.
I feel honored to be recognized for my efforts.
I received offers from Google, Amazon, and Microsoft.
Received offers from top tech companies
Google, Amazon, and Microsoft were among the offers
Had multiple options to choose from
The interview process involves multiple rounds of assessments and interviews.
Initial screening through resume and application review
First round of interview with HR or hiring manager
Technical assessment or skills test
Second round of interview with team or department head
Final interview with senior management or executives
Reference and background checks
Job offer and negotiation
The toughest interview was for a management position at a Fortune 500 company.
The interviewers asked challenging behavioral questions.
I had to provide specific examples of how I handled difficult situations.
The interview lasted for over two hours.
I had to complete a case study and present my findings to a panel of executives.
The competition was fierce, with several highly qualified candidates.
I had to demonstrate my le...
I followed a structured study plan and practiced with mock tests regularly.
Created a study schedule with specific goals and deadlines
Used online resources and textbooks to supplement my learning
Took regular mock tests to track my progress and identify areas for improvement
Joined study groups to discuss difficult concepts and share study materials
My communication, problem-solving, and teamwork skills helped me get this job.
Strong communication skills helped me effectively convey my ideas and collaborate with team members.
Problem-solving skills allowed me to identify and address challenges in the workplace.
Teamwork skills helped me work effectively with colleagues and contribute to the success of the team.
For example, I was able to successfully lead a team proje...
I consulted various online resources such as industry publications, academic journals, and company websites.
Industry publications
Academic journals
Company websites
Yes, grades played a role in my selection.
Grades were one of the criteria for selection.
My academic performance was evaluated along with other factors.
I had to meet a certain GPA requirement to be considered.
For example, I had to maintain a minimum of 3.0 GPA to be eligible for the program.
Advice for students aiming for similar placement offers
Focus on building practical skills through internships and projects
Network with professionals in your desired field
Stay updated with industry trends and technologies
Prepare well for interviews and aptitude tests
Maintain a good academic record
Be open to learning and taking feedback
Stay motivated and persevere through rejections
Top trending discussions
Some of the top questions asked at the Facebook interview -
The duration of Facebook interview process can vary, but typically it takes about 2-4 weeks to complete.
based on 34 interviews
Interview experience
based on 161 reviews
Rating in categories
Software Engineer
73
salaries
| ₹47.1 L/yr - ₹102.7 L/yr |
Software Developer
20
salaries
| ₹19.3 L/yr - ₹30.8 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