Upload Button Icon Add office photos

Facebook

Compare button icon Compare button icon Compare

Filter interviews by

Facebook Software Developer Intern Interview Questions, Process, and Tips

Updated 16 Sep 2021

Top Facebook Software Developer Intern Interview Questions and Answers

  • Q1. Base 58 Conversion Problem Statement You are given a decimal number 'N'. Your task is to convert this number into a base 58 representation. The Base58 alphabet is define ...read more
  • Q2. Bird and Maximum Fruit-Gathering Problem Statement A ninja bird can gather fruits from trees arranged in a circle. Each tree has an associated fruit value. The bird can ...read more
  • Q3. Triplets with Given Sum Problem 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 spe ...read more
View all 6 questions

Facebook Software Developer Intern Interview Experiences

2 interviews found

I appeared for an interview before Sep 2020.

Round 1 - Coding Test 

(2 Questions)

Round duration - 30 minutes
Round difficulty - Easy

2 easy problems for coding.

  • Q1. 

    All Prime Numbers Less Than or Equal to N

    Given a positive integer N, your task is to return all the prime numbers less than or equal to N.

    Note:

    1) A prime number is a number that has only two factors:...
  • Ans. 

    Return all prime numbers less than or equal to a given positive integer N.

    • Iterate from 2 to N and check if each number is prime using a helper function.

    • A number is prime if it has only 2 factors: 1 and itself.

    • Optimize by checking divisibility only up to square root of the number.

  • Answered by AI
  • Q2. 

    Running Absolute Difference in Arrays

    Given an array ARR consisting of 'N' non-negative integers, compute the running absolute difference of elements at even and odd index positions, respectively.

    Input:

    ...
  • Ans. 

    Compute running absolute difference of elements at even and odd index positions in an array.

    • Iterate through the array and calculate absolute difference between elements at even and odd indices.

    • Keep track of running absolute differences for even and odd indices separately.

    • Output the final running absolute differences for even and odd indices.

  • Answered by AI
Round 2 - Video Call 

Round duration - 30 minutes
Round difficulty - Hard

Face to face interview, design and coding involved.

Interview Preparation Tips

Professional and academic backgroundI completed Software Engineering from Delhi Technological University. I applied for the job as SDE - Intern in LondonEligibility criteriaCGPA above 7Facebook interview preparation:Topics to prepare for the interview - DBMS, Data Structures and Algorithms , OOP, Maths puzzles, Aptitude , CN, OSTime required to prepare for the interview - 2 monthsInterview preparation tips for other job seekers

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

Application resume tips for other job seekers

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

Final outcome of the interviewRejected

I appeared for an interview before Sep 2020.

Round 1 - Coding Test 

(2 Questions)

Round duration - 75 minutes
Round difficulty - Easy

Timing it is around 11 am and Environment is good .

  • Q1. 

    Bird and Maximum Fruit-Gathering Problem Statement

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

  • Ans. 

    The task is to find the maximum number of fruits a bird can gather within a given time frame, moving between adjacent trees.

    • Start from each tree and calculate the maximum fruits that can be gathered within the time frame.

    • Use a sliding window approach to keep track of the fruits collected while moving between trees.

    • Choose the starting tree that gives the maximum total fruits collected.

    • Example: For input N=7, M=3, ARR={2...

  • Answered by AI
  • Q2. 

    Base 58 Conversion Problem Statement

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

  • Ans. 

    Convert a decimal number to base 58 using a specific alphabet.

    • Iterate through each test case and convert the decimal number to base 58 using the given alphabet.

    • Handle the conversion by dividing the number by 58 and taking the remainder to find the corresponding base 58 character.

    • Build the base 58 representation by appending the characters in reverse order.

    • Output the final base 58 representation for each test case.

  • Answered by AI
Round 2 - Telephonic Call 

(2 Questions)

Round duration - 45 mintues
Round difficulty - Medium

Environment was very friendly but questions asked are hard

  • Q1. 

    Pair Sum Problem Statement

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

  • Ans. 

    Count distinct pairs in an array whose sum equals a given target.

    • Use two pointers approach to iterate through the array and find pairs with sum equal to target.

    • Keep track of visited pairs to avoid counting duplicates.

    • Return -1 if no such pair exists with the given target.

  • Answered by AI
  • Q2. 

    Triplets with Given Sum Problem

    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.

    Explanation:

    A t...

  • Ans. 

    The task is to find all distinct triplets in an array that sum up to a specified number.

    • Iterate through the array and use nested loops to find all possible triplets.

    • Use a set to store unique triplets and check if the sum equals the target sum.

    • Handle edge cases like duplicate elements and no valid triplets.

    • Return the triplets or -1 if no valid triplet exists.

  • Answered by AI

Interview Preparation Tips

Professional and academic backgroundI applied for the job as SDE - Intern in DelhiEligibility criteria8 CGPA aboveFacebook interview preparation:Topics to prepare for the interview - Linked List, Binary Search Tree ,Queue, Array ,DP ,Graph ,RecursionTime required to prepare for the interview - 3 monthsInterview preparation tips for other job seekers

Tip 1 : Practice Atleast 500 Questions
Tip 2 : Do atleast 1 good projects
Tip 3 : You should be able to explain your project

Application resume tips for other job seekers

Tip 1 : Have some projects on resume. 
Tip 2 : Do not put false things on resume.

Final outcome of the interviewSelected

Skills evaluated in this interview

Software Developer Intern Interview Questions Asked at Other Companies

Q1. Sum of Maximum and Minimum Elements Problem Statement Given an ar ... read more
asked in Amazon
Q2. Fish Eater Problem Statement In a river where water flows from le ... read more
asked in Apple
Q3. Kevin and his Fruits Problem Statement Kevin has 'N' buckets, eac ... read more
asked in CommVault
Q4. Sliding Maximum Problem Statement Given an array of integers ARR ... read more
Q5. Reverse Words in a String: Problem Statement You are given a stri ... read more

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 appeared for an interview before Sep 2020.

Round 1 - Coding Test 

(2 Questions)

Round duration - 60 minutes
Round difficulty - Easy

There was 2 coding questions
Based on ds and algorithms

  • Q1. 

    Ninja's Pattern with Powers of 2

    Ninja, who loves playing with numbers, sets out to arrange numbers within 'N' rows. The unique arrangement follows these rules: the first row contains 1 number, the second...

  • Ans. 

    Generate a pattern of numbers in rows following a specific sequence based on powers of 2.

    • Start with 1 number in the first row, 2 numbers in the second row, 4 numbers in the third row, and so on based on powers of 2.

    • Fill the pattern with numbers in increasing sequence from 1 to 9, recycling back to 1 after reaching 9.

    • Output the pattern for a given number 'N' of rows.

    • Example: For N = 4, the pattern would be 1, 23, 4567,

  • Answered by AI
  • Q2. 

    Validate Binary Search Tree (BST)

    You are given a binary tree with 'N' integer nodes. Your task is to determine whether this binary tree is a Binary Search Tree (BST).

    BST Definition:

    A Binary Search Tr...

  • Ans. 

    Validate if a given binary tree is a Binary Search Tree (BST) or not.

    • Check if the left subtree of a node contains only nodes with data less than the node's data.

    • Check if the right subtree of a node contains only nodes with data greater than the node's data.

    • Recursively check if both the left and right subtrees are also binary search trees.

    • Example: For a node with data 4, left subtree nodes (2, 1, 3) are smaller and righ

  • Answered by AI
Round 2 - Coding Test 

(2 Questions)

Round duration - 60 minutes
Round difficulty - Easy

There was 2 coding questions based on ds and algorithms

  • Q1. 

    Zig-Zag Array Rearrangement

    You are provided with an array of distinct elements, and your task is to rearrange the array elements in a zig-zag manner. Specifically, for every odd index i, the element ARR[...

  • Ans. 

    Rearrange array elements in a zig-zag manner where every odd index element is greater than its neighbors.

    • Iterate through the array and swap elements to satisfy the zig-zag condition.

    • Ensure that for every odd index i, ARR[i] > ARR[i-1] and ARR[i] > ARR[i+1].

    • Multiple correct answers may exist for a given array.

  • Answered by AI
  • Q2. 

    Flatten a Linked List

    You are provided with a linked list of 'N' nodes. Each node contains two pointers: NEXT, pointing to the next node in the list, and CHILD, pointing to a linked list. Each child linke...

  • Ans. 

    Flatten a linked list of sorted child linked lists into a single sorted linked list.

    • Traverse the linked list and maintain a priority queue to keep track of the next smallest element.

    • Merge the child linked lists into the priority queue while traversing the main linked list.

    • Pop elements from the priority queue to create the final flattened linked list.

  • Answered by AI
Round 3 - Video Call 

(1 Question)

Round duration - 45 Minutes
Round difficulty - Medium

My interview started at 9:30 and it took around 45 minutes to complete my interview.This was held on Amazon Chime and the interview lasted for 1 hour. Firstly the interviewer asked to introduce about myself, later asked regarding the projects I have mentioned in my resume. Then started displaying the coding question. The first question is number of islands in a matrix.

  • Q1. 

    Number of Islands Problem Statement

    You are provided with a 2-dimensional matrix having N rows and M columns, containing only 1s (land) and 0s (water). Your goal is to determine the number of islands in t...

  • Ans. 

    Count the number of islands in a 2D matrix of 1s and 0s.

    • Use Depth First Search (DFS) or Breadth First Search (BFS) to traverse the matrix and identify connected groups of 1s.

    • Maintain a visited array to keep track of visited cells to avoid redundant traversal.

    • Increment the island count each time a new island is encountered.

    • Consider edge cases like when the matrix is empty or all cells are water (0s).

  • Answered by AI

Interview Preparation Tips

Professional and academic backgroundI applied for the job as SDE - 1 in HyderabadEligibility criteriaAbove 65 percentAmazon interview preparation:Topics to prepare for the interview - Data Structures and Algorithms, Operating Systems, Computer Networks, JavaTime required to prepare for the interview - 3 monthsInterview preparation tips for other job seekers

Tip 1 : Be enough confident, don't be nervous. Maintain atleast 2 projects in your resume.
Tip 2 : You should be able to answer each and every thing present in your resume. Don't lie in your resume.
Tip 3 : Prepare Data Structures and Algorithms well. They mostly check our Problem Solving ability to find the solutions for the real world problems

Application resume tips for other job seekers

Tip 1 : Mention your skills in which you are perfect
Tip 2 : Mention atleast two projects

Final outcome of the interviewRejected

Skills evaluated in this interview

I appeared for an interview before Sep 2020.

Round 1 - Coding Test 

(2 Questions)

Round duration - 90 minutes
Round difficulty - Easy

This was an online technical round on the mettl platform, the test window was open from 22 to 25 May 2020
The test had 28 mcqs and 2 coding questions.
The test was proctored. One needed to have webcam on.
A sample test link was provided before test to get familiar with the mettl platform.

  • Q1. 

    Count Inversions Problem Statement

    Given an integer array ARR of size N, your task is to find the total number of inversions that exist in the array.

    An inversion is defined for a pair of integers in the...

  • Ans. 

    Count the total number of inversions in an integer array.

    • Iterate through the array and for each pair of elements, check if the conditions for inversion are met.

    • Use a nested loop to compare each pair of elements efficiently.

    • Keep a count of the inversions found and return the total count at the end.

  • Answered by AI
  • Q2. 

    Find Pair with Maximum GCD in an Array

    Given an array of positive integers, your task is to find the GCD (Greatest Common Divisor) of a pair of elements such that it is the maximum among all possible pair...

  • Ans. 

    Find the pair with the maximum GCD in an array of positive integers.

    • Iterate through all pairs of elements in the array.

    • Calculate the GCD of each pair using Euclidean algorithm.

    • Keep track of the maximum GCD found so far.

    • Return the maximum GCD value.

  • Answered by AI
Round 2 - Video Call 

(2 Questions)

Round duration - 60 minutes
Round difficulty - Medium

Time : 12pm to 1pm
Mode of Interview : Amazon Chime Video
LiveCode : To write code, it was not a compiler
The interviewer was quite supportive.

  • Q1. 

    Majority Element Problem Statement

    Given an array/list 'ARR' consisting of 'N' integers, your task is to find the majority element in the array. If there is no majority element present, return -1.

    Exampl...

  • Ans. 

    Find the majority element in an array, return -1 if no majority element exists.

    • Iterate through the array and keep track of the count of each element using a hashmap.

    • Check if any element's count is greater than floor(N/2) to determine the majority element.

    • Return the majority element or -1 if no majority element exists.

  • Answered by AI
  • Q2. 

    Subarray with Equal Occurrences Problem Statement

    You are provided with an array/list ARR of length N containing only 0s and 1s. Your goal is to determine the number of non-empty subarrays where the numbe...

  • Ans. 

    Count the number of subarrays where the number of 0s is equal to the number of 1s in a given array of 0s and 1s.

    • Iterate through the array and keep track of the count of 0s and 1s encountered so far.

    • Use a hashmap to store the difference between the counts of 0s and 1s seen at each index.

    • Increment the count of subarrays whenever the difference between the counts seen before matches the current difference.

  • Answered by AI
Round 3 - Video Call 

(2 Questions)

Round duration - 60 minutes
Round difficulty - Medium

Time : 11 am to 12am
Mode of Interview : Amazon Chime Video
LiveCode : To write code, it was not a compiler
The interviewer was quite supportive.

  • Q1. 

    Sorted Linked List to Balanced BST Problem Statement

    Given a singly linked list where nodes contain values in increasing order, your task is to convert it into a Balanced Binary Search Tree (BST) using th...

  • Ans. 

    Convert a sorted linked list into a Balanced Binary Search Tree (BST) using the same data values.

    • Create a function to convert the linked list to an array for easier manipulation.

    • Implement a function to build a Balanced BST from the array recursively.

    • Ensure the height difference of the subtrees is no more than 1 for each node.

    • Use level order traversal to output the values of the BST nodes.

    • Handle NULL nodes by representi

  • Answered by AI
  • Q2. 

    Implement Stack with Linked List

    Your task is to implement a Stack data structure using a Singly Linked List.

    Explanation:

    Create a class named Stack which supports the following operations, each in O(1...

  • Ans. 

    Implement a Stack data structure using a Singly Linked List with operations in O(1) time.

    • Create a class named Stack with getSize, isEmpty, push, pop, and getTop methods.

    • Use a Singly Linked List to store the elements of the stack.

    • Ensure each operation runs in O(1) time complexity.

    • Handle edge cases like empty stack appropriately.

    • Test the implementation with sample queries to verify correctness.

  • Answered by AI

Interview Preparation Tips

Professional and academic backgroundI applied for the job as SDE - Intern in BangaloreEligibility criteriaAbove 6.5 CGPA, No backlogsAmazon interview preparation:Topics to prepare for the interview - Data Structures and Algorithms, OOPS, DBMS, Computer Networks, Operating SystemTime required to prepare for the interview - 4 monthsInterview preparation tips for other job seekers

Tip 1 : Practice questions from all the topics as much as possible
Tip 2 : Be very much attentive while doing projects in college or anywhere, they are asked in detail if mentioned in resume.
Tip 3 : Be consistent while practicing and do a variety of questions rather than doing more questions of same kind.

Application resume tips for other job seekers

Tip 1 : You should know whatever you have mentioned in your resume. Don't brag in your resume ever. Be very precise. It doesn't matter how much you have done, what matters is you are very much confident and clear about what you have done.
Tip 2 : Put your projects and the language you code in for sure in your resume.

Final outcome of the interviewSelected

Skills evaluated in this interview

I appeared for an interview in Sep 2020.

Round 1 - Coding Test 

(2 Questions)

Round duration - 215 minutes
Round difficulty - Medium

* Debugging(C, C++, Java, Python) [Time given was quite enough.]
* Coding(Any programming language was allowed. 2 coding questions medium to difficult level 70 mins)
* Psychometric test based on Leadership principle — Don’t take it for granted. I would suggest to pay attention while 
answering to this as well.
* Aptitude and Logical reasoning (Good enough time was given.)

  • Q1. 

    Weird Number Pattern Problem Statement

    You are given an integer 'N'. Your task is to print a specific pattern for the given number of rows 'N'.

    Input:

    The first line contains a single integer ‘T’ repres...
  • Ans. 

    Print a specific pattern of '1's for a given number of rows 'N'.

    • Read the number of test cases 'T'

    • For each test case, read the number of rows 'N'

    • Print '1' repeated i times for each line i from 1 to N

  • Answered by AI
  • Q2. 

    Find All Pairs Adding Up to Target

    Given an array of integers ARR of length N and an integer Target, your task is to return all pairs of elements such that they add up to the Target.

    Input:

    The first line ...
  • Ans. 

    Given an array of integers and a target, find all pairs of elements that add up to the target.

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

    • If the complement exists, add the pair to the result. Otherwise, add the current element to the hash set.

    • Handle cases where the same element is used twice in a pair.

    • Return (-1, -1) if no pair is found.

  • Answered by AI
Round 2 - Video Call 

(1 Question)

Round duration - 60 minutes
Round difficulty - Medium

(Time — 5.30 p.m.): I introduced myself. My interviewer told me that he would divide the interview into three phases.
Phase 1- Introduction and questions on life instances where I proved my efficiency. (barely 10 minutes, I answered well.)
Phase 2- Data Structures’ Understanding and questions related to it. (Hashing concept and complete conceptual details about it. Internal working, collisions, how to avoid them etc.) (15 minutes, He was satisfied with my answers. Don’t just answer. Explain !)

  • Q1. 

    Longest Unique Substring Problem Statement

    Given a string Str consisting of N lowercase Latin letters, you need to determine the longest substring without repeating characters.

    A substring is defined as ...

  • Ans. 

    Given a string, find the longest substring without repeating characters.

    • Use a sliding window approach to keep track of the longest substring without repeating characters.

    • Use a hashmap to store the index of each character as it appears in the string.

    • Update the start index of the window when a repeating character is found.

    • Keep track of the longest substring length and its starting index.

    • Return the substring starting from...

  • Answered by AI
Round 3 - Video Call 

(2 Questions)

Round duration - 70 minutes
Round difficulty - Hard

(Time — 7.00 p.m.): I introduced myself. The interviewer directly jumped onto the questions. He asked me two questions. The first question he asked me was: Coding Question

  • Q1. 

    Longest Substring with At Most K Distinct Characters

    Given a string S of length N and an integer K, find the length of the longest substring that contains at most K distinct characters.

    Input:

    The first...
  • Ans. 

    Find the length of the longest substring with at most K distinct characters in a given string.

    • Use a sliding window approach to keep track of the characters and their counts within the window.

    • Maintain a hashmap to store the characters and their frequencies.

    • Update the window size and characters count as you iterate through the string.

    • Return the maximum window size encountered for each test case.

  • Answered by AI
  • Q2. 

    Count Set Bits Problem Statement

    Given a positive integer N, compute the total number of '1's in the binary representation of all numbers from 1 to N. Return this count modulo 1e9+7 because the result can...

  • Ans. 

    Count the total number of set bits in the binary representation of numbers from 1 to N modulo 1e9+7.

    • Use bitwise operations to count the set bits in each number from 1 to N.

    • Consider using dynamic programming to optimize the solution.

    • Remember to return the count modulo 1e9+7 to handle large results.

  • Answered by AI

Interview Preparation Tips

Professional and academic backgroundI applied for the job as SDE - Intern in HyderabadEligibility criteria8 AboveAmazon interview preparation:Topics to prepare for the interview - Data Structures, Algorithms, OOPS, Graphs, Trees, Core SubjectsTime required to prepare for the interview - 6 monthsInterview preparation tips for other job seekers

Tip 1 : Focus on medium and hard questions. Solving a lot of easy questions doesn't help.
Tip 2 : Start with the basics if you have lost touch with competitive coding. Don't directly jump to interview questions.
Tip 3 : Create a timetable and set goals. Keep aside 3-4 hours for studying. Consistency is the key.

Application resume tips for other job seekers

Tip 1 : Keep it clean and simple.
Tip 2 : You should have good projects to showcase

Final outcome of the interviewSelected

Skills evaluated in this interview

I appeared for an interview before Sep 2020.

Round 1 - Coding Test 

(2 Questions)

Round duration - 2 hour 30 mins
Round difficulty - Easy

Debugging: This section had 7 debugging problems, which consist of code snippets that have some logical error that needs to be rectified.
Reasoning Ability: This section consists of some verbal reasoning questions and some aptitude questions.
Coding: This section consists of 2 coding problems.

  • Q1. 

    Search in a Row-wise and Column-wise Sorted Matrix Problem Statement

    You are given an N * N matrix of integers where each row and each column is sorted in increasing order. Your task is to find the positi...

  • Ans. 

    Given a sorted N * N matrix, find the position of a target integer X within the matrix.

    • Iterate over each row and column to search for the target integer X

    • Utilize the sorted nature of the matrix to optimize the search process

    • Return the position of X if found, else return -1 -1

  • Answered by AI
  • Q2. 

    Clone Linked List with Random Pointer Problem Statement

    Given a linked list where each node has two pointers: one pointing to the next node and another which can point randomly to any node in the list or ...

  • Ans. 

    Cloning a linked list with random pointers by creating new nodes rather than copying references.

    • Create a deep copy of the linked list by iterating through the original list and creating new nodes with the same values.

    • Update the random pointers of the new nodes by mapping the original node's random pointer index to the corresponding new node.

    • Ensure the cloned linked list is an exact copy of the original by validating th...

  • Answered by AI
Round 2 - Video Call 

(2 Questions)

Round duration - 60 minutes
Round difficulty - Medium

Around 30 candidates were shortlisted from my campus and over 150+ candidates were shortlisted from the university, and I was one of them. Then my first round of interviews was scheduled. I was pretty nervous before the interview.

  • Q1. 

    Return in Row Wave Form Problem Statement

    You are provided with a 2D array having dimensions 'N*M'. Your task is to traverse the elements row-wise and return a single-dimensional array which stores these ...

  • Ans. 

    Traverse a 2D array row-wise and return elements in a wave pattern.

    • Traverse the 2D array row-wise and store elements alternately in a wave pattern.

    • For each row, store elements from left to right for odd rows and from right to left for even rows.

    • Return the final 1D array representing the wave pattern of elements.

  • Answered by AI
  • Q2. 

    Strict Binary Tree Construction

    Given two lists, one representing the preorder traversal ('PRE') of a strict binary tree and the other ('TYPENL') indicating if each node is a leaf ('L') or non-leaf ('N')....

  • Ans. 

    Construct a strict binary tree from preorder traversal and leaf/non-leaf indicators.

    • Create a binary tree node class with value and left/right pointers.

    • Use a stack to keep track of parent nodes while constructing the tree.

    • Check if the current node is a leaf or non-leaf based on 'TYPENL' list.

  • Answered by AI
Round 3 - Video Call 

(1 Question)

Round duration - 60 minutes
Round difficulty - Medium

My interviewer introduced himself in the beginning and asked for my introduction.

  • Q1. 

    Alien Dictionary Problem Statement

    You've been provided with a sorted dictionary in an alien language. Your task is to determine the character order of this alien language from this dictionary. The dictio...

  • Ans. 

    Given a sorted dictionary in an alien language, determine the character order of the language.

    • Iterate through the dictionary to find the order of characters based on their appearance in words.

    • Create a graph of characters and their relationships based on adjacent words in the dictionary.

    • Perform a topological sort on the graph to determine the character order.

    • Return the list of characters in the correct order as the outp

  • Answered by AI

Interview Preparation Tips

Professional and academic backgroundI applied for the job as SDE - Intern in HyderabadEligibility criteriaAbove 7 CGPAAmazon interview preparation:Topics to prepare for the interview - Data Structures, OOPS, Algorithms, DBMS, OS, NetworksTime required to prepare for the interview - 4 monthsInterview preparation tips for other job seekers

Tip 1 : Practice ds and algo
Tip 2 : Be confident
Tip 3 : Speak out loud and Be clear

Application resume tips for other job seekers

Tip 1 : Mention only what you know
Tip 2 : Having Cp ranks is a plus

Final outcome of the interviewSelected

Skills evaluated in this interview

I appeared for an interview before Sep 2020.

Round 1 - Coding Test 

(2 Questions)

Round duration - 45 minutes
Round difficulty - Medium

The first Round was held on Hackerrank and the questions were of medium difficulty based on Data Structures and Algorithms.
The time of test was 1:00 PM and it was of 45 minutes with 2 coding questions to be solved.

  • Q1. 

    Merge Overlapping Intervals Problem Statement

    Given a specified number of intervals, where each interval is represented by two integers denoting its boundaries, the task is to merge all overlapping interv...

  • Ans. 

    Merge overlapping intervals and return sorted list of merged intervals.

    • Identify overlapping intervals based on start and end times

    • Merge overlapping intervals to form new intervals

    • Sort the merged intervals in ascending order of start times

  • Answered by AI
  • Q2. 

    Josephus Problem Statement

    Consider 'N' individuals standing in a circle, numbered consecutively from 1 to N, in a clockwise direction. Initially, the person at position 1 starts counting and will skip K-...

  • Ans. 

    The Josephus problem involves eliminating individuals in a circle until only one remains, based on a specific counting rule.

    • Start counting from position 1, skip K-1 individuals, eliminate the Kth person, and continue until only one person remains.

    • The position of the last surviving person can be determined based on the initial numbering and the value of K.

    • Example: For N=5 and K=2, the last person standing is at position

  • Answered by AI
Round 2 - Coding Test 

(2 Questions)

Round duration - 75 minutes
Round difficulty - Medium

A google Doc was shared with us and we were supposed to write code there. 
Use of IDEs was not allowed so we had to write correct code on Google Docs which was later checked by them through online IDEs.
The Interviewer were friendly and observative and helped us through code if we made some silly error.

  • Q1. 

    Largest Rectangle in Histogram Problem Statement

    You are given an array/list HEIGHTS of length N, where each element represents the height of a histogram bar. The width of each bar is considered to be 1.

    ...
  • Ans. 

    Compute the area of the largest rectangle that can be formed within the bounds of a given histogram.

    • Iterate through the histogram bars and maintain a stack to keep track of increasing heights.

    • Calculate the area of the rectangle formed by each bar as the smallest height in the stack times the width.

    • Update the maximum area found so far.

    • Time complexity can be optimized to O(N) using a stack-based approach.

  • Answered by AI
  • Q2. 

    Boundary Traversal of a Binary Tree

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

    Input:

    The first line ...
  • Ans. 

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

    • Traverse the left boundary nodes in top-down order

    • Traverse the leaf nodes in left-right order

    • Traverse the right boundary nodes in bottom-up order

    • Handle duplicates in boundary nodes by including them only once

  • Answered by AI
Round 3 - Face to Face 

(2 Questions)

Round duration - 60 minutes
Round difficulty - Medium

The face to face round was held on Google Meet where initially Interviewer asked a DS/Algo problem and then Later Manager Joined and asked about our resume projects in detail.
The time was 10:00 AM

  • Q1. 

    Maximum Sum Rectangle Problem

    Given an M x N matrix of integers ARR, your task is to identify the rectangle within the matrix that has the greatest sum of its elements.

    Input:

    The first line of input co...
  • Ans. 

    Find the rectangle within a matrix with the greatest sum of elements.

    • Iterate through all possible rectangles within the matrix and calculate their sums

    • Use Kadane's algorithm to find the maximum sum subarray for each row combination

    • Keep track of the maximum sum found so far

  • Answered by AI
  • Q2. 

    Rotated Array Minimum Finder

    You are provided with a sorted array that has undergone 'K' rotations (the exact value of 'K' is unknown). A rotation involves shifting each element of the array to the right,...

  • Ans. 

    Find the minimum number in a rotated sorted array efficiently.

    • Use binary search to find the minimum element in the rotated array.

    • Compare mid element with the last element to determine which half to search.

    • Adjust the search space based on the comparison to find the minimum element efficiently.

  • Answered by AI

Interview Preparation Tips

Professional and academic backgroundI applied for the job as SDE - Intern in BangaloreEligibility criteriaAbove 6 CGPAAmazon interview preparation:Topics to prepare for the interview - Dynamic Programming, Greedy Techniques, Data Structures, OOPs, DBMS, Graph TheoryTime required to prepare for the interview - 3 MonthsInterview preparation tips for other job seekers

Tip 1 : Prepare OS,DBMS,OOPs too
Tip 2 : Mention atleast one project or past work experience in your resume
Tip 3 : Try maintaining 8+ CGPA as sometimes shortlist is done based on CGPA
Tip 4 : Try past interview questions from Leetcode,Interviewbit.

Application resume tips for other job seekers

Tip 1 : Try to Keep Resume 1 Pager 
Tip 2 : Have atleast one project or past work experience mentioned
Tip 3 : Don't put false things on Resume as questions are asked in detail from Resume

Final outcome of the interviewSelected

Skills evaluated in this interview

I applied via Company Website and was interviewed before Nov 2021. There were 2 interview rounds.

Round 1 - Resume Shortlist 
Pro Tip by AmbitionBox:
Keep your resume crisp and to the point. A recruiter looks at your resume for an average of 6 seconds, make sure to leave the best impression.
View all tips
Round 2 - Technical 

(2 Questions)

  • Q1. Find cousine of a node in a binary tree
  • Ans. 

    Find the cousin of a node in a binary tree.

    • Cousins are nodes at the same level but with different parents.

    • Traverse the tree to find the level and parent of the given node.

    • Traverse the tree again to find all nodes at the same level with different parents.

    • Return the cousin node if found, else return null.

  • Answered by AI
  • Q2. One question on 2 pointer appraoch

Interview Preparation Tips

Interview preparation tips for other job seekers - prepare trees well, should be able to describe project work

Skills evaluated in this interview

I appeared for an interview before Sep 2020.

Round 1 - Coding Test 

(2 Questions)

Round duration - 150 Minutes
Round difficulty - Easy

Debugging: This section had 7 debugging problems, which consist of code snippets that have some logical error that needs to be rectified.
Reasoning Ability: This section consists of some verbal reasoning questions and some aptitude questions.
Coding: This section consists of 2 coding problems.

  • Q1. 

    Search in a Row-wise and Column-wise Sorted Matrix Problem Statement

    You are given an N * N matrix of integers where each row and each column is sorted in increasing order. Your task is to find the positi...

  • Ans. 

    Given a sorted N * N matrix, find the position of a target integer 'X'.

    • Iterate over each row and column to search for the target integer 'X'.

    • Utilize the sorted nature of the matrix to optimize the search process.

    • Return the position of 'X' if found, else return '-1 -1'.

  • Answered by AI
  • Q2. 

    Clone Linked List with Random Pointer Problem Statement

    Given a linked list where each node has two pointers: one pointing to the next node and another which can point randomly to any node in the list or ...

  • Ans. 

    Deep copy a linked list with random pointers and return its head. Validate if the cloned linked list is an exact copy of the original.

    • Create a new node for each node in the original linked list and maintain a mapping between original and cloned nodes.

    • Update the next and random pointers of the cloned nodes based on the mapping.

    • Time complexity: O(N) where N is the number of nodes in the linked list.

    • Space complexity: O(N)...

  • Answered by AI
Round 2 - Video Call 

(2 Questions)

Round duration - 60 minutes
Round difficulty - Medium

Around 30 candidates were shortlisted from my campus and over 150+ candidates were shortlisted from the university, and I was one of them. Then my first round of interviews was scheduled. I was pretty nervous before the interview.

  • Q1. 

    Row Wave Form Problem Statement

    Given a 2D array with dimensions N*M, your task is to read the array elements in a row-wise manner and return a linear array that stores the elements in a 'wave' pattern. S...

  • Ans. 

    Given a 2D array, return a linear array storing elements in a 'wave' pattern.

    • Read the array elements row-wise and store in wave pattern

    • Alternate direction for storing elements from each row

    • Handle edge cases like single row or single column arrays

    • Use nested loops to iterate through the 2D array

  • Answered by AI
  • Q2. 

    Construct a Strict Binary Tree Problem

    Given an array/list of integers PRE representing the preorder traversal of a strict binary tree, and an array/list TYPENL with values 'L' or 'N', where 'L' denotes a...

  • Ans. 

    Given preorder traversal and node type information, construct a strict binary tree and return the root node.

    • Create a binary tree using preorder traversal and node type information

    • Use recursion to construct the tree

    • Handle leaf and non-leaf nodes separately

    • Ensure each node has 0 or 2 children

  • Answered by AI
Round 3 - Video Call 

(1 Question)

Round duration - 60 minutes
Round difficulty - Medium

My interviewer introduced himself in the beginning and asked for my introduction.

  • Q1. 

    Alien Dictionary Problem Statement

    You are provided with a sorted dictionary (by lexical order) in an alien language. Your task is to determine the character order of the alien language from this dictiona...

  • Ans. 

    Given a sorted alien dictionary in an alien language, determine the character order of the language.

    • Iterate through the dictionary to build a graph of character dependencies.

    • Perform a topological sort on the graph to determine the character order.

    • Return the character array representing the order of characters in the alien language.

  • Answered by AI

Interview Preparation Tips

Professional and academic backgroundI applied for the job as SDE - Intern in HyderabadEligibility criteriaAbove 7 CGPAAmazon interview preparation:Topics to prepare for the interview - Data Structures, OOPS, Algorithms, DBMS, OS, NetworksTime required to prepare for the interview - 4 monthsInterview preparation tips for other job seekers

Tip 1 : Practice ds and algo
Tip 2 : Be confident
Tip 3 : Speak out loud and be clear

Application resume tips for other job seekers

Tip 1 : Mention only what you know
Tip 2 : Having Cp ranks is a plus

Final outcome of the interviewSelected

Skills evaluated in this interview

Tell us how to improve this page.

Facebook Software Developer Intern Reviews and Ratings

based on 1 review

5.0/5

Rating in categories

5.0

Skill development

4.0

Work-life balance

5.0

Salary

4.0

Job security

5.0

Company culture

4.0

Promotions

5.0

Work satisfaction

Explore 1 Review and Rating
Software Engineer
80 salaries
unlock blur

₹46.2 L/yr - ₹102 L/yr

Software Developer
22 salaries
unlock blur

₹23.9 L/yr - ₹50.6 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.0
Compare

Apple

4.3
Compare

eBay

3.8
Compare
Did you find this page helpful?
Yes No
write
Share an Interview