Back to problems

Find Minimal Shoppers

Algorithm · Instacart · Medium

Minimum Shoppers to Meet Average Wait Time A fulfillment company processes customer orders using a team of shoppers. Each shopper works on one order at a time, and all orders must be handled in the order they are placed. You are given an array orders where each element is a pair [duration, arrivalTime]. Here, duration is the time required to complete the order, and arrivalTime is the moment the customer submits it. When a new order arrives at its arrivalTime, it is assigned…

Checking your access…