Facebook Phone Screen (London)

Difficulty: EASYCategory: InterviewExperienceFrequency: 1Asked On 2021-06-30Added By Anonymous
Source: Link

Company: Meta (Facebook)
Role: e3, e4
Interview Stage: Phone Screen
Location: London
Year: 2021

Original Post Content:

I had a 45 min facebook phone screen on 29/06/2021 for a product role at London Office. I was asked two questions.

1st Question: https://leetcode.com/problems/find-k-closest-elements/

I proposed the solution using Binary Search but the implementation wasn't 100% correct. I ran out of time during the end of code and interviewer said to move to next question. He told there is something wrong and we can dry run at the end if we had time at the end.

2nd Question: https://leetcode.com/problems/binary-tree-right-side-view/

I solved it in time using BFS. The code was correct and I was able to verify by doing a dry run. Interviewer asked me a follow-up: how can we do it with DFS (no need to code)? I gave a solution but he said it is the right path but you are complicating it.

At the end time was finished so interviewer said there is some problem with 1st code but we ran out of time.

I just realized while creating this post the questions were directly from LeetCode. I mean even the input/output was same as LeetCode question.

Comments