Facebook reached out to me the month of June 2020. I was given 4 week time prepare for phone screening round.
I was asked below two questions. It looked easy to me and 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 first problem but later to meet other test scenario, i changed approach without telling interviewwer. Maybe that was the mistake I made annd was counted as one of the negative point as well).
But on positive note, It was wonderful experience to connect with facebook and interviewer was nice as well.
Got feedback from HR very next day. Upon asking reason, I was told that 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 -> nullhttps://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)