Meta Interview experience
2 rounds over 5 weeks. No offer, meh experience.
Was asked to implement a class that reads 4k characters at a time from stdin and stores it in a buffer.
Was given the leetcode meeting room problem in this round. The interviewer didn’t interact much during the interview so the experience wasn't great.
Problem Statement:
Given a list of intervals where each interval represents the start and end time of a meeting, determine the minimum number of meeting rooms required to accommodate all meetings without overlap.
Examples:
Input: meetings = [[0, 30], [5, 10], [15, 20]]
Output: 2
Input: meetings = [[1, 4], [2, 3], [3, 6], [5, 8], [7, 9]]
Output: 3Can be solved using two pointer or min-heap
Solution:
def min_meeting_rooms(intervals):
if not intervals:
return 0
# Separate and sort the start and end times
start_times = sorted([interval[0] for interval in intervals])
end_times = sorted([interval[1] for interval in intervals])
# Pointers for start and end times
start_pointer = end_pointer = 0
used_rooms = 0
max_rooms = 0
# Iterate over all the meetings by start time
while start_pointer < len(intervals):
# If a meeting starts before the earliest ending one finishes
if start_times[start_pointer] < end_times[end_pointer]:
used_rooms += 1
start_pointer += 1
else:
# Meeting room freed up
used_rooms -= 1
end_pointer += 1
# Track maximum rooms in use
max_rooms = max(max_rooms, used_rooms)
return max_rooms
Time Complexity: O(nlogn), because we still need to sort the start and end times.
Space Complexity: O(n), for storing start and end times separately.
Didn't hear back for a while and had to follow-up multiple times to finally get a rejection. The recruiter wasn't able to share any feedback. Overall an okay experience.
Know someone interviewing at Meta? Pass it on.
Same company, different candidates.
Share yours while it’s fresh. It takes five minutes, it’s anonymous, and it will help future candidates.