INMOBI Hiring Off-Campus OA (2022) | Problem Average Waiting Time
Question · Posted Jun 2026
Problem Statement There is a restaurant with a single chef. You are given a 2D array customers where: customers[i] = [arrivali, timei] arrivali = arrival time of the ith customer. timei = time required to prepare that customer's order. The chef: Can serve only one customer at a time. Starts preparing food immediately if free. Continues working without interruption while customers are waiting. The waiting time for a customer is: (Food Completion Time) - (Arrival Time) Return the average waiting ...
The full answer & interview discussion are available to premium members.
Log in Create a free account