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

SWE Intern

Facebook
upvote
share-icon
2 rounds | 5 Coding problems

Interview preparation journey

expand-icon
Preparation
Duration: 5 Months
Topics: Data Structures & Algorithms, Graph Theory, Binary/Interval Tree, Heaps, Probability, Randomised algorithms, and sometimes design problems.
Tip
Tip

Tip 1 : Start as early as you can, and be consistent while you are practicing. It's like the Law of Inertia i.e initially it seems very hard but once you get into practice you'll start enjoying the process.
Tip 2 : If you have enough(3-4 months) time then try to solve problems in a Depth First manner i.e explore each topic before jumping to the next one.
Tip 3 : Make sure to cover company-specific problems before your final interview this would help you to find a pattern in what exactly the organization is seeking in a candidate. Also, if possible try to talk to people who have gone through the same process in the past.

Application process
Where: Other
Eligibility: N/A
Resume Tip
Resume tip

Tip 1 : Recruiters love seeing things that you have done other than your academics, so make sure you have good side projects to showcase, participate in Hackathons, and coding competition.
Tip 2 : Try contributing to open-source projects but don't limit yourself to just GSoC, RGSoC, or Outreachy. Contribute to projects that have a huge impact this would help your profile to stand out.

Interview rounds

01
Round
Medium
Video Call
Duration45 minutes
Interview date21 May 2020
Coding problem2

It was a 45 min coding interview which has 3 sections, the first 5 min are reserved for you & your interviewer to introduce each other. After which you're expected to solve 2-3 coding problems with bug-free code and while solving make sure you think out loud and discuss your approach with your interviewer before start coding.
At the end of the interview, you'll be asked to discuss any questions or doubts if you've any.

1. Arithmetic Progression Queries

Ninja
44m average time
50% success
0/200
Asked in companies
OYOFacebookGoldman Sachs

Given an integer array(ARR) of size N, the following operations need to be performed:

update(l, r, val) : Add (val + i) to arr[l + i] where, 0 <= i <= r - l.

rangeSum(l, r): return the sum of all elements in the array from index l to r, i.e., the sum of array arr[l...r].

Two type of queries denote these operations:

Type 1: for update(l, r, val) operation.
Type 2: for rangeSum(l, r) operation.

Note: (1 based indexing) for the queries.
Try solving now

2. Arithmetic Expression Evaluation

Moderate
30m average time
70% success
0/80
Asked in companies
AdobeFacebookMicrosoft

You are given a string ‘expression’ consists of characters ‘+’, ‘-’, ‘*’, ‘/’, ‘(‘, ‘)’ and ‘0’ to ‘9’, that represents an Arithmetic Expression in Infix Notation. Your task is to evaluate this Arithmetic Expression.

In Infix Notation, operators are written in-between their operands.

Note :
1. We consider the ‘/’ operator as the floor division.

2. Operators ‘*’ and ‘/’ expression has higher precedence over operators‘+’ and ‘-’ 

3. String expression always starts with ‘(‘ and ends with ‘)’.

4. It is guaranteed that ‘expression’ represents’ a valid expression in Infix notation.

5. It is guaranteed that there will be no case that requires division by 0.

6. No characters other than those mentioned above are present in the string. 

7. It is guaranteed that the operands and final result will fit in a 32-bit integer.
For example :
Consider string ‘expression’ = ‘((2+3)*(5/2))’. 
Then it’s value after evaluation will be ((5)*(2)) = 10. 
Try solving now
02
Round
Hard
Video Call
Duration60 minutes
Interview date1 Jul 2020
Coding problem3

It was a 60 min interview of which the first 15 min were dedicated to behavioral questions and the remaining 45 min was the same as the last round.

The way behavioral round works is that your interviewer will give you a situation and will seek your inputs on how would you tackle this or may ask you to share some incidents from your past where you exhibited a few leadership skills. I would suggest being prepared upfront with 1-2 stories from your past internships or college life where you led a team or handled a tough situation.

1. Interleaving Two Strings

Moderate
45m average time
50% success
0/80
Asked in companies
SalesforceSprinklrHSBC

You are given three strings 'A', 'B' and 'C'. Check whether 'C' is formed by an interleaving of 'A' and 'B'.

'C' is said to be interleaving 'A' and 'B', if the length of 'C' is equal to the sum of the length of 'A' and length of 'B', all the characters of 'A' and 'B' are present in 'C' and the order of all these characters remains the same in all three strings.

For Example:
If A = “aab”, 'B' = “abc”, 'C' = “aaabbc”
Here 'C' is an interleaving string of 'A' and 'B'. because 'C' contains all the characters of 'A' and 'B' and the order of all these characters is also the same in all three strings.

interleaving

If 'A' = “abc”, 'B' = “def”, 'C' = “abcdefg”
Here 'C' is not an interleaving string of 'A' and 'B'. 'B'ecause neither A nor 'B' contains the character ‘g’.
Try solving now

2. Get DFS Path

Easy
15m average time
90% success
0/40
Asked in companies
FacebookSprinklrOptum

You are given an undirected graph G(V, E), where ‘V’ is the number of vertices and ‘E’ is the number of edges present in the graph and two integers ‘v1’ and ‘v2’ denoting vertices of the graph, find and print the path from ‘v1’ to ‘v2’ (if exists) in reverse order. Print an empty list if there is no path between ‘v1’ and ‘v2’.

Find the path using DFS and print the first path that you encountered.

Note:
Vertices are numbered through 0 to V-1.
Try solving now

3. Basic HR Questions

Why you wanna join Facebook?

Tell me an incident where you missed the deadline for assignment submission and how did you handle it?

Here's your problem of the day

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

Skill covered: Programming

Which SQL keyword removes duplicate records from a result set?

Choose another skill to practice
Similar interview experiences
company logo
SDE - Intern
2 rounds | 4 problems
Interviewed by Facebook
934 views
0 comments
0 upvotes
company logo
SDE - Intern
2 rounds | 3 problems
Interviewed by Facebook
1409 views
0 comments
0 upvotes
company logo
SDE - 1
5 rounds | 10 problems
Interviewed by Facebook
729 views
0 comments
0 upvotes
company logo
Business Technology Analyst
1 rounds | 2 problems
Interviewed by Facebook
0 views
0 comments
0 upvotes
Companies with similar interview experiences
company logo
SWE Intern
4 rounds | 6 problems
Interviewed by Microsoft
2102 views
0 comments
0 upvotes
company logo
SWE Intern
3 rounds | 4 problems
Interviewed by Google
903 views
0 comments
0 upvotes
company logo
SWE Intern
1 rounds | 2 problems
Interviewed by Google
868 views
0 comments
0 upvotes