Hey Folks,
About me:
Working with Amazon for around 8 years, for my entire career.
Its my time to give back to community. In this post I just want to include the questions and process for Facebook. I reached out to recruiter around March, and got my phone screen scheduled for early April.
Phone screen had 2 tech questions:
- Check if a given target element is found in the infinitly long sorted array.
- Return the largest BST in the given BT.
I was able to solve and code both of them in 45 minutes. I got a call for full interview loop, which got scheduled for mid May. There were 5 rounds scheduled, 3 coding, 1 system design and 1 leadership, each for 45 minutes, with buffer of 15 minutes for system design.
1st coding round:
- Given 2 strings, you need to find the smallest starting index of the substring in first string which is an anagram to the second string. Similar to https://leetcode.com/problems/minimum-window-substring/. (Solved with best time complexity. Coded it perfectly. Interviewer expected to improve on space, but we ran out of time in that discussion).
2nd coding round:
- Cannot recollect exact question. But, it was leetcode medium problem. It took me around 20-25 minutes on that question.
- For a tic-tac-toe board, implement the makeAMove method, which takes the player and the location where he is making the move, and return true if the player wins after this move, else false. (Optimized it from worst time to O(1) time, and coded it).
3rd coding round:
- Implement the serliazer and de-serializer for a given BT. (Discussed 4-5 approaches, with pros and cons of them. The interviewer gave me 3-4 minutes to code one of the approaches, and didn't let me finish).
System design:
- Given FB already has everything required for posting a post. How would you add/change the design of systems, so as to enable to privacy on the post.
(I clarified a few things: This privacy can be changed by user at any time after/while posting the post. Once the privacy is updated, the targetted users should be able to see/not see the post).
Leadership:
Same old, describe a situation of conflict with team/manager. How you resolved it. Whats your current role, how much time you spend in coding/design etc.
I think, everything went well. I got a call from recruiter 10 days after the interviews, mentioning that they don't have sufficient data points for system design, and hence wanted one more round for the same. I got it scheduled for the following week.
- Design Memcache. The interviewer talked at a low level aspect of things. Given the machine's capacity, how many IOPS this can do, threads which can run. Which protocol will be best for the network communication. How will you keep this protocal/connection channel with clients. Difference bettwen HTTP/TCP/UDP etc., which to use when. After 25 minutes, he moved on to high level design. Asked which DS to use and why. How will you build things for multithreading environment. Talked about the locks etc.
I am still waiting on the decision. Keeping fingers crossed.
[Update]: Got No Hire call. No specific feedback provided.