Meta | E4 | Phone Screen | US

Difficulty: MEDIUMCategory: InterviewExperienceFrequency: 1Asked On 2024-11-06Added By Anonymous
Source: Link

Company: Meta
Role: E4
Interview Stage: Phone Screen
Location: US
Year: unknown

Original Post Content:

I had my phone screen yesterday. Was rejected about 24 hours later.

Here are the questions I received:

Mock:
Move Zeroes - https://leetcode.com/problems/move-zeroes/description/?envType=company&envId=facebook&favoriteSlug=facebook-thirty-days
3Sum - https://leetcode.com/problems/3sum/description/?envType=company&envId=facebook&favoriteSlug=facebook-thirty-days

Phone Screening:

1. write a class for RunningSumAverage
There is an infinite stream of values and you are asked to give the average of the last k values
ex: 1, 2, 5, 3, 5, 76, 24, .....
k = 3

ma = RunningSumAverage(4) # window size if 4
ma.add(1)
ma.add(3)
ma.add(2)
ma.add(5)
ma.avg() # returns 11/4 = 2
ma.add(8)
ma.avg() # returns 17/4 = 4

2. BST to double linked list
https://leetcode.com/problems/convert-binary-search-tree-to-sorted-doubly-linked-list/description/
but not circular

Solved both problems optimally and explained well. Did not move forward to onsite. Rejected after 24 hours. Hope this info helps someone

Comments