Google Phone Screen
Summary
I recently interviewed at Google for a phone screen, and the main challenge was to implement a restaurant waitlist system.
Full Experience
My Google phone screen involved a task to design and implement a restaurant waitlist. I focused on ensuring the system could efficiently handle parties joining and leaving the list, and then intelligently seat the first suitable party when a table became available. We discussed various data structures and edge cases to ensure robustness.
Interview Questions (1)
Implement a restaurant waitlist. It should support the following features: A party of customers can join the waitlist. A previously joined party can leave the waitlist at any time. The restaurant serves the first party whose size fits the empty table size at a time (a table size is given as an argument).