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.
can you help ?
smart 🤣🤣
Do the maths once again :-)
Nice kata though I would prefer if it came with boolean return value and a better title.
No, because you're not thinking on bills, you have 100 dollars, yes, but 2 50 dollars bills, how do you give 75 back like that?
This precondiotion is completely wrong:
Line.Tickets(new int[] { 25, 25, 50, 50, 100 }) // => NO. Vasya will not have the right bills to give 75 dollars of change (you can't make two bills of 25 from one of 50)
Explanation:
Obviously if You have 100 dollars, you can sell the last ticket
ohhhhhh ok, that makes sense. thanks.
Your logic is incorrect. Just because you receive a 100 dollar bill, doesn't mean you can give 25 change for next customer. Likewise, if you have one 50 dollar bill, and next customer gives a 50, there's no way for you to give change.
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution