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.
See if my edition is good enough for you.
That's what the examples are for:
tickets([25, 100]) // => NO. Vasya will not have enough money to give change to 100 dollars
But what text do you suggest to add in the instructions anyway?
You can't break a 100 bill to obtain a 25 or a 50 bill. So the only logic interpretation is the second one.
Let's review your math in the first case:
One customer gives you a 25 bill, you have only one of them.
Second customer gives you another 25 bill, you have two of them now.
The third customer comes with a 100 bill, you have not 75 dollars (only 50 in two 25 bills), so the answer is NO.
If you're selling tickets unless you didn't sell any, you can't end with no bills.
Don't mark that as a kata issue, it's not. The correct interpretation is the second one, it's clear in the kata description:
Each of them has a single 100, 50 or 25 dollars bill