Meta Screening Interview
Difficulty: MEDIUMCategory: InterviewExperienceFrequency: 1Asked On 2025-03-03Added By Anonymous
Source: Link
Company: Meta
Role: e3, e4
Interview Stage: Phone Screen
Location: unknown
Year: unknown
Original Post Content:
I recently had a phone screening with Meta.
These are the two questions asked during the interview.
Q1. Design a set with the below functionalities
add(element) - increments value for element. If not present, add element with value 1.
remove(element) - decrements value for element. If value reaches 0, remove the element. (Was asked to decide what would be a better option in case key was not present)
count(element) - returns count
Q2. Variant of 528. Random Pick with Weight (binary search solution expected)
Got a call from recruiter with positive feedback. Thank you community for all help!!