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.
What B1ts says doesn't imply changing the order of the list.
There are two ways to give change for a $100 and one is more efficient than the other.
Vasya can successfully give change to everyone in this case without changing the order:
Then the Kata is not clear on that. It mentions nothing about being able to shuffle people around. When most people think a line, they think first to last, one after the other.
The clerk collects 25 (no change), then another 25, then he receives 50 and gives back 25 change. He now has 1 x 25 and 1 x 50 (exactly 75), which he gives to the next customer and keeps the 100.
Out of the two options you provided, #1 is correct.
Does that make sense now?
No, he wouldn't have enough. The clerk would receive 1 x 100 bill, and he has only 2 x 25 bills to give for change (not enough for 75 needed)
Not a kata issue.
Don't you think you could use that 50 to give change for 100? The test case is correct.