This is a verified interview question from Pace-stock-broking. Candidates reporting seeing this problem in recent Online Assessments (OAs) and onsite rounds. Mastering "Minimum Number of Chefs Required" covers key patterns like Other.
"You are running a restaurant and are expecting n customers. The customers are represented by a vector of N × 3 where the ith customer is represented by (arrival_i, departure_i, numberDishes_i). The ith customer arrives at time arrival_i and will stay till time departure_i. The ith customer will order numberDishes_i dishes. What is the minimum number of chefs you need to hire so that all the customers can be served? * Assume that any chef can prepare any dish in 1 unit of time. * A customer takes no time to eat the dishes after they are served, and they order all the dishes at once as soon as they come."
Join thousands of developers practicing for Pace-stock-broking.