Facebook
4.6 of 5 637 reviews
www.facebook.com Menlo Park, CA 5000+ Employees

Facebook Software Engineer Interview Questions & Reviews

Updated Apr 14, 2014
All Interviews Received Offers

Getting the Interview 

25%
21%
19%

Interview Experience 

61%
25%
13%

Interview Difficulty 

312 candidate interviews Back to all interview questions
Relevance Date Difficulty
in
40 people found this helpful

No Offer

Positive Experience

Difficult Interview

Software Engineer Interview

Anonymous Interview Candidate
Menlo Park, CA

I applied through a recruiter and the process took 3 months - interviewed at Facebook in November 2013.

Interview Details – This was for a position in their Infrastructure team in Cambridge MA.

Recruiter contacted me in September and was very interested in my background and experience with highly scalable systems - both in Finance and Mobile phone payments.
I attended some small intimate presentations they did as they were initially opening a new Boston office and wanted to grow it out. The meetings were great and I learned a lot about how they solve some of their biggest problems.

I then did a screening interview on-site (because I don't do technical screens well on the phone). The question was "Given a binary tree, write code to print the tree out line by line". I did OK and got the Breadth First Search down fine, but couldn't figure out the - line-by-line part. (Turns out this is Facebook's #1 question to ask in interviews).

Although my performance wasn't great they gave me a break on that and asked me back for another screening interview. This time I prepared well for another coding interview but it turned out to be a Design interview. The problem was

"Imagine you have 10,000 servers and need to monitor the performance of each one, how would you do it" - naturally you need to be able to NOT take too much of the bandwidth and so you'll have to do sampling, have some history to watch for trends etc.

I passed that and was very excited to be flown out to Menlo Park for the final round.
I studied like CRAZY based on questions on this site and CareerCup. I took 4 weeks and studied about 15 hours per week.

Turns out I focused on the wrong questions - I studied Tree, String, Array and List algorithms based on the distribution of Q&A but I was asked Binary math and heap algorithms. Here are the questions I was asked.

1) How would you implement division without +, - or multiplication (a "classic" question, but not one of the ones I would focus on). I bombed on this as I was not expecting and could not recall my binary math. I figured out the high level outline but that was all. That I was asked this in the "culture fit" interview made this doubly unexpected.

2) Given 10,000 servers containing a Billion integers each how would you find how to find the median? I knew the answer to this question (use two heaps) - not because I had focused on it, but I had found it an interesting question while studying. However he then asked "How much memory do you need?" and I didn't know how big the heaps would need to be. The real answer I was trying to get is - what is the minimum heap you need. I had a guess but I think I got this wrong.

3) Given a List structure where each node contains a Next node and optionally a pointer to another list, flatten that list
e.g.

L1 --> L2 --> L3 --> L7 --> L8
                      |
                      v
                     L4 --> L5-->L6

WIll be flattened to
L1 --> L2 --> L3 -->L4 -->L5-->L6-->L7-->L8

I did OK on this - getting the answer - but it appeared I took too long. The interviewer also interrupted me a lot while I was writing an initial solution and that threw me off - I like to be more iterative in my problem solving but I think he expected 100% immediate correctness.
He had an observer there too and that guy looked bored out of his mind and that bugged me a little too as it wasn't clear who would be doing the judging.

4) I was also handed some hard to read Python code (I don't know Python) and asked to figure out what it does. I did OK on this - but again surprised to be handed hard-to-read code in a language I didn't know.

5) One final question "How would you implement the "ls" Unix function in your language of choice. It should take the input:
>ls a/b/c/*/e/*/f/*/*/g
and the output should be similar the the output given by unix."

I used a tree structure to represent the file directory structure and wrote a solution from there. I did OK on this.

Overall: Everyone seemed very nice - I had a nice lunch and the campus is interesting but it was clear that what I studied was not what I needed to (so lesson learned: don't just trust the distribution of questions on Glassdoor or CareerCup). I even got to walk past Zuckerberg's office (more of a conference room) and saw Sheryl Sandberg in there.

One interesting thing I learned is a lot of Google people are leaving for Facebook. Also I'd say if you are over 30 (I am 41) you are a rare bird at Facebook :-)

I knew based on the reactions of the interviewers that it was very probably a bust, but overall a good experience and something I will learn from. Very disappointing as I really wanted to be one of the first few Facebook engineers in the Boston area - and to work on their super high scalability issues but such is Life.

Interview Question – How would you implement division without +, - or multiplication   View Answers (4)

Was this interview helpful?  
Yes | No
Flag Interview  |  Add Employer Response

No Offer

Neutral Experience

Software Engineer Interview

Anonymous Interview Candidate

Interviewed at Facebook

Interview Details – Recruiter contacted me from LinkedIn profile and got me first round of interviews in NYC office

Interview Question – How do you find the kth smallest number in a binary search tree.   Answer Question

Was this interview helpful?  
Yes | No
Flag Interview  |  Add Employer Response

No Offer

Positive Experience

Difficult Interview

Software Engineer Interview

Anonymous Interview Candidate

I applied through an employee referral and the process took 1 week - interviewed at Facebook in January 2014.

Interview Details – Phone interview and then on site. In the phone interview, they ask me to solve the 3 sum problem (check leetcode) and the bucket anagram problem. In the on site interview, 3 interviewers ask me three algorithm problems and also the behavior problems. Then there's a brief tour to the campus.

Interview Question – On site interview, they ask me regular expression match (check leetcode) and search for range (like, 1,2 3, 7,7,7, 9, 9, return how many 7's in the array) and also knowledge about the garbage collection, linked list, reverse linked list.   View Answer

Was this interview helpful?  
Yes | No
Flag Interview  |  Add Employer Response

We want your feedback – Is this interview information helpful to you?  Yes | No

No Offer

Positive Experience

Average Interview

Software Engineer Interview

Anonymous Interview Candidate
Menlo Park, CA

I applied through a recruiter and the process took 1 week - interviewed at Facebook in April 2012.

Interview Details – They found me at SO careers for some reason. First we had a HR with nothing really particular then an other skype/phone interview with real time coding. The guy was ok and friendly, answering all my questions. It was the usual American style interview with absolutely meaningless basic CS questions.

Interview Question – Why do you want to work at facebook? (I didn't really... :))   Answer Question

Was this interview helpful?  
Yes | No
Flag Interview  |  Add Employer Response

No Offer

Positive Experience

Difficult Interview

Software Engineer Interview

Anonymous Interview Candidate

I applied online - interviewed at Facebook in November 2013.

Interview Details – HR responded pretty fast, then they scheduled a phone interview.
During the interview
- They introduced their group
- Talked about my project and work experience
- Asked me a coding question ( I list it blow, because it is difficult question for most people I think)

Interview Question – Given an encoded message containing digits, determine the total number of ways to decode it.   Answer Question

Was this interview helpful?  
Yes | No
Flag Interview  |  Add Employer Response

No Offer

Negative Experience

Difficult Interview

Software Engineer Interview

Anonymous Interview Candidate

I applied online and the process took 4+ weeks - interviewed at Facebook in February 2014.

Interview Details – They asked me to code on Collabedit. The first question was finding the largest drop in a an array. The second question was implementing a regex matching function. My interview was not bad, but overall, I am not pleased with the hiring process in Facebook. The interviewer was ignorant in my expert field.

Interview Question – Regex matching function   Answer Question

Was this interview helpful?  
Yes | No
Flag Interview  |  Add Employer Response

No Offer

Neutral Experience

Average Interview

Software Engineer Interview

Anonymous Interview Candidate
Menlo Park, CA

I applied online and the process took 6 weeks - interviewed at Facebook.

Interview Details – After uploading my resume and solving the puzzle I had requested, I got contacted by a recruiter through email. After two weeks, the recruiter interviewed me over the phone to learn about my interests.

Then, in about two weeks, I had my phone interview. I was asked a question on comparing two general tree data structured. I answered the question and wrote the code correctly in the given space/time constraints.

A week later I was contacted again and invited for on-site interview. However, the timing was not good and they said given my status (that I need an H1B), and current cap, they cannot move forward with the interview.

The whole experience was smooth and exciting. I was just not quite lucky with the timeline.

Interview Question – You might be asked on how much you expect for compensation (by the recruiter). The coding question was alright. It was to compare two general trees and making sure they have the same elements.   Answer Question

Was this interview helpful?  
Yes | No
Flag Interview  |  Add Employer Response

No Offer

Positive Experience

Easy Interview

Software Engineer Interview

Software Engineer

I applied through college or university and the process took 1+ week - interviewed at Facebook.

Interview Details – Went onsite for the interview. I was asked regex matching. The recruiters were pretty nice. The interviewer was grim and did not give any reaction. I thought I did well but didn't get the job.

Interview Question – The questions were pretty simple.   Answer Question

Was this interview helpful?  
Yes | No
Flag Interview  |  Add Employer Response

1 person found this helpful

No Offer

Neutral Experience

Difficult Interview

Software Engineer Interview

Software Engineer
Seattle, WA

I applied through a recruiter and the process took 4+ weeks - interviewed at Facebook in February 2014.

Interview Details – Was contacted by recruiter in LinkedIn and started interview process. He was transparent, prompt and supporting during the process. He updated me every on every step and details and he was prompt: getting feedback after 3 hours from phone interview speaks for itself. Then I had on-site interview, three interviewer liked my answers, system design really like my design and thinking, but apparently one of the interviewer didn't like my coding style and I was asked to come for one more interview just to check the coding part again. So tip: use whiteboard better, apparently working and clean code is not enough it needs to look clean on board as well :) Overall process was positive. But, I had a feeling that some interviewers are really un-experienced and focus on wrong things. Also big difference from other companies: they expect you to be really fast (read - you need to know answer upfront). If you don't know answer upfront, but come up with solution after thinking, trying, making misatkes and optimizing - it doesn't count, at least it didn't in my case. Try to solve my problem below (if you don't know answer already), implement, test it on board in 15-20 minutes.
Advice for FB: train your interviewers to focus on skills, NOT memorized skills.

I have offer from big companies/competitors, so I will just go with them.

Interview Question – Question is verbose, uses search engine, string matching etc., but at the end boils down to this: There is two dimensional array where each sub array (row) is sorted, i.e.

[[1 1000 2000]
[20 10001 5000]
[55 10002 222222]]

Find a minimum range contain a number from each row. For above array it should be (1000-1002) range.
  View Answers (4)

Was this interview helpful?  
Yes | No
Flag Interview  |  Add Employer Response

1 person found this helpful

No Offer

Neutral Experience

Software Engineering Interview

Anonymous Interview Candidate

Interviewed at Facebook

Interview Details – Two coding questions:
1) print binary tree level by level
2) regular expression matching

Was this interview helpful?  
Yes | No
Flag Interview  |  Add Employer Response
RSS Feed Embed
Interviews for Top Jobs at Facebook

Worked for Facebook? Contribute to the Community!

The difficulty rating is the average interview difficulty rating across all interview candidates.

The interview experience is the percentage of all interview candidates that said their interview experience was positive, neutral, or negative.

Your response will be removed from the review – this cannot be undone.

Glassdoor is your free inside look at Facebook Software Engineer interview questions and advice. All 312 interview reviews posted anonymously by Facebook employees and interview candidates.