-
Notifications
You must be signed in to change notification settings - Fork 69
Open
Labels
Description
Write a function which takes two arguments: a list of customers and the number of open cash registers. Each customer is represented by an integer which indicates the amount of time needed to checkout. Assuming that customers are served in their original order, your function should output the minimum time required to serve all customers.
checkout_time([5, 1, 3], 1) should return 9
checkout_time([10, 3, 4, 2], 2) should return 10 because while the first register is busy serving customer[0] the second register can serve all remaining customers
Reactions are currently unavailable