Was asked the exact same question.
Implement Restaurant Waitlist API
Implement restaurant waitlist API and data structure with the following requirements: 1) A party of customers can join the waitlist (with a reasonable limit of n people). 2) A party which has joined the waitlist can leave at any time. 3) When a table becomes free, serve the first party on the waitlist that fits the available size (e.g., a party of 4 can join a table of 6 if they are first in waitlist, but a party of 8 doesn't fit at a table of size 6).
Onde essa pergunta já apareceu
Use esses exemplos para entender em que contexto ela costuma cair e adaptar sua prática.
Materiais associados
Nenhum anexo público associado a esta pergunta.
Depois de treinar essa pergunta, vale abrir outras do mesmo tipo e da mesma senioridade para comparar padrões de resposta.
Isso ajuda a sair da memorização de uma resposta só e entrar em repertório real de entrevista.
Continue a preparação com o banco completo
No app você encontra perguntas parecidas, compara empresas e aprofunda essa busca com mais filtros.