Facebook Seattle | E5 | Mar 2020 | [Reject]
Company: Meta
Role: E5
Interview Stage: Onsite
Location: Seattle
Year: 2020
Original Post Content:
Education: Bachelors in Computer Science
Experience: ~6 years with Amazon
Location: Seattle
Timeline: Interviews from first week of March to first week of April
Contact from recruiter
I was reached out by the recruiter during the last week of February to see if I was interested in an Android role at Facebook. I told him I was not and am looking at infra kind of roles. The recruiter connected me to another one who scheduled a Phone screen in the first week of March.
Phone Screen
This was a 45 minute round and the interviewer indicated that he would ask me 2 questions and to adjust my time accordingly.
First Question
- Given a mathematical expression write code to - validate the expression, convert it to postfix and evaluate the postfix expression.
- https://leetcode.com/problems/word-break-ii/ - I only gave the brute force solution and when time was running out talked through the optimization of using a map.
Overall, I felt very hard to write the code for the above in ~40 minutes. I definitely would not be able to if I did not know the approaches beforehand. The interviewer was very particular about syntaxing and wanted a ready-to-run code.
I got a call in a week saying that they are considering me for virtual onsite and asked me to give dates.
Onsite
First Round
- Given a linked list, reverse every 'k' elements.
- Given an array, find the counts such that (i<j and a[i] > a[j]). -- I gave a brute force solution and did not know the optimal. The interviewer tried to give me a hint of using merge sort but I was unable to come up with a working solution.
Second Round (Manager Round)
Ton of LP questions. I would suggest you have a prepared list of answers to the most common questions. That should be more than enough for this round.
The person I talked to on the other side was having a very strong Spanish accent and it was very hard for me to understand him and vice-versa. We easily wasted 15 minutes just repeating what we spoke.
Third round
- Given a file system volume, write an algorithm to defragment it. Assume the memory chunks in the file system can be represented as a linked list. Followup: Given two volumes, compare if they are equivalent... This question seemed very open-ended. I felt like the interviewer had a solution in mind and wanted me to come up with it. He wanted me to come up with a structure for memory chunk and contents etc... The followup ultimately was just comparing 2 linked lists for equality.
- Modification of https://leetcode.com/problems/nested-list-weight-sum/
Fourth round (Design)
I feel this is the round that made the most difference. I sort-of-bombed it and also the communication b/w the interviewer and me was non-existent.
Question : Design a system that can ingest facebook statuses and run billions of queries against those statuses.
To be honest, I have very good knowledge of this type of system as I have worked on similar one at Amazon and also prepared before the interview (*** the design , twitter talks , lucene talks etc...)
The biggest mistake I made was that I went deep into a single area and did not really take it step by step. The interviewer tried once/twice to ask questions to make me answer what he wanted but I guess I got carried away. His very thick Asian accent did not help either.
My suggestions for this would be to have mock interviews with peers/friends and also start with the basics.
For eg.. we discussed A-Records and CNAMES somehow but not Load Balancing in detail ... :(
Fifth Round
- A very modified problem similar to https://leetcode.com/problems/read-n-characters-given-read4-ii-call-multiple-times/. If you had done this, you would do it easily.
- https://leetcode.com/problems/divide-two-integers/ --- I bombed this question completely. I always felt like this is a bad question to ask in an interview setting and never saw the approaches. I was able to answer the brute force(subtraction) and the power of 2 solution but missed a lot of edge cases. (The interviewer sort of wanted me to cover cases involving signed/unsigned ints/longs etc...)
Overall, I think the interview is not very difficult compared to an L5 interview at Amazon. The difference is that FB expects you to write pitch-perfect code while at Amazon, you are given some leeway as long as your algo is right.
Got to blame myself, I did not prepare very seriously (LeetCoded for a week or so and did only the FB questions). A bit disappointed but am okay.
Lessons learnt
- Leetcode 2-3 problems everyday. Don't become rusty especially in times like these.
- Write in a text editor and make sure you get it right in the first couple of runs.
- Improve communication. You might know a lot of stuff but it does not matter if you cannot articulate it.
- Practice design interviews by discussing ideas with friends ... listen to talks .