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?
Expert in Data Structures & Algorithms. Building tools to help developers crack FAANG interviews.