Facebook | Research Scientist | Seattle | December 2019 [Reject]
Anonymous User
9424

Status: New grad, PhD CS
Position: Research Scientist at Facebook
Location: Seattle, WA
Date: December 9th, 2019

I was contacted by a recruiter from Facebook when I haven't even started looking and preparing. But I went with it anyway since I had 8 months until graduation and this would be a great experience. This was my first ever interview and it was a stressful one as well since I only had a month to prepare.

Technical phone screen (45 minutes):
Two technical questions:

  • The first one I don't actually remember but it was pretty easy and straighforward. It took about 15 minutes to finish both explaining and writing.
  • The second one was also straightforward but it was a little bit tricky and had a lot of edge cases. He asked me to implement an API class to be a middle man between another API which provided files in 1024 bytes only and users. However, users could ask for any amount of bytes from our API. This class should have a buffer to store all the recieving data and passes it to users. There was just a lot of cases, e.g. what if the user asks for a data size bigger than what it is left, what if the file was too large, and few more.

Onsite:
I had my onsite on Monday and started around 10AM. The interviewer arrived few minutes late but we still had time since the actual interviews started at 10:15AM. I had 2 technical interview (had 3 but last one got cancelled) and 1 research interview.
In the 2 interviews I finished answering all 4 questions. I don't remember the order but here are 3 of them:

  • Validate BST: This one I suggested a recursive implmentation and he asked me to go ahead and implement it. I ended up with 2 functions but at the end I suggested that we could do it with 1 function as well.
  • Sort alien dictionary: The question was given a list of words and string which gives the order of alphabet, sort the words. e.g. "bac" means b comes before a and a comes before c. I think I used hashtable to store the orders and then went ahead and implemented it with a regular sort using the hashtable. I think this was the one I messed in implementation in few places. I just had hiccups since it was the last question and I was very tired.
  • Sum of consecutive element in array: Similar to this, however, the integers where non-negative. GIven an unordered list of non negative integers, find the range where the sum of range was equal to target. First I suggested a bruteforce method. He asked if I can improve it. I thought about it out loud for 2 minutes ish! And came up with an O(n) solution using two pointers. He asked me to go ahead and implement it and the implementation was pretty quick. Once you figure out the optimal solution it was easy to implement.
  • (Unfortunately I don't remember the last, which was the easiest)

My research interview was nothing interesting, it was basically about my PhD research and asked questions about my approach in solving research problems.

They told me it should take about two weeks to get back. Exactly after two weeks, on Monday, I got email that they went ahead with someone else. I asked for the reason of rejection and they told me they can't give me any details but I should try again in a year.

Takeaway from this interview: I think I came up with solutions pretty fast, however, I was a little rusty in implementations. Since then I have been practicing a lot more and hopefully, soon will join all the 9 to 5ers. Until then happy coding!

All the best to all who have upcoming interviews.! Hope this helps!

UPDATE: I forgot that I had a design interview as well. The question was to design a website for Programming Contests. I had experiment in ACM competitions so I did come up with a solution and designed a full system with APIs and Databases.

Comments (9)