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
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...
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...
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...
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
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...
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.
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...
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.
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...
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.
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...
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.
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...
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.
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...
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.
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.
Top trending discussions
I applied via LinkedIn and was interviewed in May 2024. There were 2 interview rounds.
I was interviewed in Jan 2021.
Round duration - 90 minutes
Round difficulty - Hard
Online coding round , 2-3 questions. Level - med-hard
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...
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'.
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.
The first line con...
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
Round duration - 60 Minutes
Round difficulty - Medium
2 interviewers , coding problem, no compilation.
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...
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.
Round duration - 40 minutes
Round difficulty - Medium
CS fundamentals. Tough round. 40 mins interview. 1 interviewer from USA
Round duration - 40 minutes
Round difficulty - Hard
System Design Problem
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
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
Tip 1 : Atleast 4 projects on Resume
Tip 2 : Do not write false things. You always get caught. Be genuine.
I applied via Company Website and was interviewed in Nov 2024. There were 2 interview rounds.
Leetcode similar coding tests
I applied via Company Website and was interviewed in Nov 2023. There was 1 interview round.
1 hour, 2 question. 1. Meetting scheduler (leetcode)
Few aptitude questions were asked in the interview
Reverse string without doing anything to special characters
I was interviewed before Sep 2020.
Round duration - 90 minutes
Round difficulty - Easy
This was MCQ+Coding round.
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.
Round duration - 90 minutes
Round difficulty - Easy
This was face to face interview round.
Round duration - 90 minutes
Round difficulty - Easy
This was face to face interview round.
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.
Add projects and Internships if you have done any and add only those things which you really know.
Final outcome of the interviewSelectedI was interviewed before Sep 2020.
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.
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...
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.
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
Find the next smallest palindrome strictly greater than a given number 'N' represented as a string 'S'.
You are given a number in string format, a...
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.
Round duration - 80 Minutes
Round difficulty - Medium
Interview started at 11:00 am. Interview went well.
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.
The first line ...
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
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.
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.
I was interviewed in Aug 2017.
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
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.
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)]
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
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 ...
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.
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)
based on 1 interview
Interview experience
based on 8 reviews
Rating in categories
Software Engineer
73
salaries
| ₹0 L/yr - ₹0 L/yr |
Software Developer
20
salaries
| ₹0 L/yr - ₹0 L/yr |
Senior Software Engineer
19
salaries
| ₹0 L/yr - ₹0 L/yr |
Data Scientist
17
salaries
| ₹0 L/yr - ₹0 L/yr |
Manager
15
salaries
| ₹0 L/yr - ₹0 L/yr |
Amazon
Apple
eBay