Facebook onsite interview experience
Company: Meta (Facebook)
Role: e5
Interview Stage: Onsite
Location: unknown
Year: unknown
Original Post Content:
I finished my Facebook onsite. I had a total of 5 rounds:
1) Round 1 System Design: Asked to design a web crawler given a root link, assuming 1 billion links to crawl. How do you design it? I didn't do great as time was not enough but got some basic version of it. Not sure how it would get evaluated.
2) Round 2: 2 problems
i) Merge sorted arrays without duplicates. arr1 [1,3,3,5], arr2 [2,3,4] result should be [1,2,3,4,5].
I wrote the implementation very quick but missed handling a couple of test cases.
ii) Given task pairs (task, pre_req), determine if all tasks can be finished. Similar to https://leetcode.com/problems/course-schedule-ii/. Finished this one pretty quick.
3) Round 3: 30 minutes behavioral and 1 easy coding question in the last 8 mins.
Question: https://leetcode.com/problems/first-bad-version/
4) System Design: (This probably will not get evaluated as one of the rounds was just for practice for the interviewer)
Design an API canSee(owner_id, viewer_id). There are some privacy settings like "Only me", "Friends", "Friends of friends", "Public" globally defined for a user. So, if someone visits some user's content, this method should determine whether the requesting user has access to the user's content.
5) Coding: 2 problems
i) Given 2 strings (numbers), add them. Something similar to https://leetcode.com/problems/add-two-numbers/ but only string, not LL. Asked some follow-up and wasted some time asking me to write the array reverse since I was using Python's array reverse.
ii) https://leetcode.com/problems/populating-next-right-pointers-in-each-node/. This one I messed it up, got confused, and it was given in the last 10 minutes. I got the approach but could not fully solve it.
I think coding questions were easier than I expected, but I made some mistakes so I am not expecting any offer. It was for E5, so system design also might not be up to E5 level given I never looked at how a crawler works.