Facebook interview experience Real time questions & tips from candidates to crack your interview

Software Engineer

Facebook
upvote
share-icon
4 rounds | 6 Coding problems

Interview preparation journey

expand-icon
Preparation
Duration: 3 Months
Topics: Data Structures, System Design, Backend Development, OOPS, Algorithms
Tip
Tip

Tip 1 : Keep your fundamentals very clear
Tip 2 : Do not forget to revise concepts you learned before

Application process
Where: Referral
Eligibility: None
Resume Tip
Resume tip

Tip 1 : If you have multiple projects, try to put those which have skills relevant to job description
Tip 2 : Apart from the main resume, keep one detailed resume for yourself which will have all the details explained

Interview rounds

01
Round
Easy
Video Call
Duration45 Minutes
Interview date14 Sep 2018
Coding problem2

Timing - Late night
Virtual interview.
Interviewer was an experienced professional.

1. Path In A Tree

Moderate
0/80
Asked in companies
GoogleFlipkartFacebook

You are given a binary tree with ‘N’ number of nodes and a node ‘X’. Your task is to print the path from the root node to the given node ‘X’.

A binary tree is a hierarchical data structure in which each node has at most two children.

Example:
Here, for ‘X ’= 7, the output will be 1 3 7.
Try solving now

2. Maximum subarray

Moderate
55m average time
35% success
0/80
Asked in companies
AmazonGoogleInfosys

Ninjas has been given an array. He wants to find a subarray such that the sum of all elements in the subarray is maximum.

Subarray 'A' is greater than sub-array 'B' if sum(A) > sum(B). If two sub-array have the same maximum sum, then output the subarray that has a larger length.

A subarray means a contiguous part of an array. For example, In 'arr' = [1, 2, 3, 4], [1, 2], [2, 3, 4] are the contiguous subarry but [1, 3, 4] is not a subarray.

Note:

More than one sub-array can have a maximum sum, in that case, output any.
Try solving now
02
Round
Medium
Video Call
Duration45 Minutes
Interview date7 Nov 2018
Coding problem2

This was again at late night with a more senior professional.

1. Accounts Merge

Hard
15m average time
85% success
0/120
Asked in companies
FacebookPhonePeAmazon

You have been given an array/list 'accounts' where each element, i.e. 'accounts'[i] contains a list of strings.


In 'accounts'[i], the first element is the name of the account holder, and the rest of the strings are emails representing the emails of the account.


Now, you are supposed to merge the accounts. Two accounts definitely belong to the same person if there is some email that is common to both accounts. Note that it may be possible that two accounts belong to the same name, but they may belong to different people, as people could have the same name.


A person could have any number of accounts initially, but all their accounts definitely have the same name.


After merging the accounts, you have to return an array/list of merged accounts where each account, the first element is the person's name, and the rest elements are the email addresses in sorted order (non-decreasing). Accounts themselves can be in any order.


Example:
 Input:  'n' = 4,
 'accounts' = [
    ["Rohan", "rohan123@gmail.com", "1279ro@gmail.com"],
    ["Rohit", "rohit101@yahoo.com", "hitman30487@gmail.com"],
    ["Rohan", "1279ro@gmail.com",  "niemann01@gmail.com"],
    ["Rohan", "kaushik@outlook.com"],
 ]
 Output: [
    ["Rohan", "rohan123@gmail.com", "1279ro@gmail.com", "niemann01@gmail.com"],
    ["Rohit", "rohit101@yahoo.com", "hitman30487@gmail.com"],
    ["Rohan", "kaushik@outlook.com"],
 ]

 Explanation: The first and third "Rohan" are the same person as they have a shared email address, “1279ro@gmail.com”. The rest of the accounts are of different persons, as they don’t share any shared email addresses. So, we merge the first and third accounts.
Try solving now

2. Custom Sort String

Easy
10m average time
90% success
0/40
Asked in companies
FacebookCodenationZoho Corporation

You are provided with the two strings named X and Y respectively. Y has its own specific order and has no repeating characters. Your task is to arrange the characters of the first string i.e. X in such a way that the order of characters in X is exactly the same as in Y, which means if ‘d’ occurs after ‘c’ in Y then it should also occur after ‘c’ in X ( obviously if X has ‘d’ and ‘c’ as characters in it ). All you have to do is, convert string X in the specific order with respect to string Y.

Note :

Both the strings have only lowercase English alphabets. 
There may be more than one correct solution, you have to return any one of the possible solutions.
Try solving now
03
Round
Easy
Video Call
Duration45 Minutes
Interview date14 Dec 2018
Coding problem1

This one was early morning with a female inteviewer.

1. System Design Question

Designing a system to handle live comments.

Problem approach

Tip 1 : Make sure you ask as many questions as you can in the beginning itself
Tip 2 : Do not jump for buzz words keep it simple.

04
Round
Medium
HR Round
Duration30 Minutes
Interview date7 Jan 2019
Coding problem1

1. Basic HR Questions

Conflict Management, Team handling, Regarding location

Here's your problem of the day

Solving this problem will increase your chance to get selected in this company

Skill covered: Programming

Which collection class forbids duplicates?

Choose another skill to practice
Similar interview experiences
company logo
SDE - 1
4 rounds | 8 problems
Interviewed by Amazon
3070 views
0 comments
0 upvotes
Analytics Consultant
3 rounds | 10 problems
Interviewed by ZS Associates
344 views
0 comments
0 upvotes
company logo
SDE - Intern
1 rounds | 3 problems
Interviewed by Amazon
1250 views
0 comments
0 upvotes
company logo
SDE - 2
4 rounds | 6 problems
Interviewed by Expedia Group
833 views
0 comments
0 upvotes
Companies with similar interview experiences
company logo
Software Engineer
3 rounds | 5 problems
Interviewed by Mindtree
10963 views
7 comments
0 upvotes
company logo
Software Engineer
3 rounds | 7 problems
Interviewed by Optum
6888 views
1 comments
0 upvotes
company logo
Software Engineer
5 rounds | 5 problems
Interviewed by Microsoft
8378 views
1 comments
0 upvotes