Ad
  • Custom User Avatar

    I believe that when you arrive at the first 100 you'd have 3 50's and no 25's, and thus be unable to provide change for a 100 (no bill combination summing to 75)

  • Custom User Avatar

    bills are 100, 50 and 25. so if anybody paid 25 before the person paying 100, you will have change (4x25, 1x50 and 2x25, etc).

  • Custom User Avatar

    I think this test is wrong:
    25
    50
    25
    50
    25
    50
    100
    25
    50
    100
    ✘ 'NO' should equal 'YES'
    When we get to the first 100, we only have bills of 50, so the answer is no