Ad
  • Custom User Avatar

    When you took a 50 and gave back 25, your net change was 125. 3 25s and a 50.
    Then you got a 100.
    If you return 3 25s you have no more 25s left if someone gives you a 50.
    But if you return a 50 and a 25, you still got two more 25s to hand out in case you get a 50.
    Don't just count 25s, 50s are a kind of change too!

  • Custom User Avatar

    Your code is suboptimal.
    When you needed to pay back 75, you could have given a 50 and a 25 instead of 3 25s.
    That would leave you with 2 25s to use on further transactions.
    The correct answer is "YES".