Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
Ah, I got it. Thanks mate!
There is no "optimal" answer to the tests, there is only one possible answer for each test. You cannot rearrange the customers in line to take the shortest amount of time possible, you have to process the queue in the order that it's given to you. Just like in a real supermarket, they check people out in the order that they come to the registers. With that said, your code has a lot of issues, mostly because you're changing the order of the queue.
This comment is hidden because it contains spoiler information about the solution
This one had me stumped for quite a while, but the solution ended up being super satisfying. Great kata!