Google · Onsite
In processGoogle New Grad Onsite: Wait Time for the Next Customer
Role: Software Engineer, New Grad
Result: Final outcome not disclosed
Report time: June 2025
Coding: multi-server waiting time
An array arr of length n describes n service workers. Each worker's value is the time needed to serve one customer. There are m customers already waiting.
If you arrive next, return how long you must wait before a worker can begin serving you.
A commenter interpreted arr[i] as worker i's fixed service time and suggested binary-searching the answer: for a candidate time x, count how many customers all workers can begin or complete by x, then move the search boundary according to whether that count reaches m.
Practice: Wait Time for the Next Customer
The original report is only one sentence and does not explicitly define whether all workers start idle, whether the queue is FCFS, or whether “wait” ends when service starts or finishes. Those assumptions are stated explicitly in the linked practice problem rather than attributed to the candidate.
Comments
0No comments yet — be the first to share what you know.