Was asked a variation of this problem with no concurrent delivery bonuses and a flat rate for the deliveries but considering both cancelled and fulfilled deliveries. Was more focus on the efficient solution of the payout calculation rather than designing the classes for the API.
Design and implement Dasher payout calculation system
Design an API that can calculate payout for deliveries a driver took, including debugging existing payout business logic. The system should handle mock data from dependent APIs representing deliveries with metadata like status enums (accepted, cancelled, delivered). Each delivery event has a timestamp and delivery ID, with guaranteed corresponding events for each accepted delivery. Payment is based on fixed rates and bonus factors determined by the number of ongoing deliveries the driver has. The API handles one driver at a time.
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.