Ad
  • Custom User Avatar

    See if my edition is good enough for you.

  • Custom User Avatar

    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?

  • Custom User Avatar

    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.

  • Custom User Avatar

    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