Facebook Interview | London | July 2020
Company: Meta (Facebook)
Role: e3, e4
Interview Stage: Phone Screen
Location: London
Year: 2020
Original Post Content:
Facebook reached out to me the month of June 2020. I was given 4 week time to prepare for the phone screening round. I was asked below two questions. It looked easy to me and I had answered everything with all use cases asked. Not sure the reason behind my rejection (Maybe lack of problem solution explanation practice. I explained him approach for the first problem but later to meet other test scenario, I changed approach without telling the interviewer. Maybe that was the mistake I made and was counted as one of the negative points as well).
But on a positive note, It was a wonderful experience to connect with Facebook and the interviewer was nice as well. Got feedback from HR the very next day. Upon asking the reason, I was told that the interviewer really liked talking to me but my performance was not meeting the bar they have defined.
Question 1:Delete the kth node from the end of a singly linked list
Input: 1 -> 2 -> 3 -> 4 -> 5 -> null, k = 2
Output: 1 -> 2 -> 3 -> 5 -> null
https://leetcode.com/problems/remove-nth-node-from-end-of-list/
Questions 2:Given a set of tasks, the dependencies between them and the time that it takes to complete each one.
1) Find the minimum amount of time that it takes to complete a particular task given
the constraint that at most 1 task can be worked on at a given time
(if its prerequisites are complete).
Input:
Task: A, Dependencies: B, C Time To Complete A: 5
Task: B, Dependencies: D Time To Complete B: 4
Task: C, Dependencies: Time To Complete C: 2
Task: D, Dependencies: Time to Complete D: 2
Output:
Total Time to Complete A: 13
Input:
Task: A, Dependencies: B, C Time To Complete A: 5
Task: B, Dependencies: D Time To Complete B: 4
Task: C, Dependencies: Time To Complete C: 2
Task: D, Dependencies: Time to Complete D: 2
Task: E, Dependencies: Time to Complete E: 5
Output:
Total Time to Complete A: 13
Total Time to Complete E: 5
(A, [B,C], 5)
(B, [D], 4)
(C, [], 2)
(D, [], 2)