Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multiple Cash Registers #68

Open
armasog opened this issue Oct 6, 2018 · 0 comments
Open

Multiple Cash Registers #68

armasog opened this issue Oct 6, 2018 · 0 comments
Labels
Hacktoberfest intermediate intermediate challenges

Comments

@armasog
Copy link
Contributor

armasog commented Oct 6, 2018

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Hacktoberfest intermediate intermediate challenges
Projects
None yet
Development

No branches or pull requests

2 participants