Ad
  • Custom User Avatar

    This kata does rely on the indivisibility of bills. If Visya had a cash exchange machine [100, 100, 100] would work because he could put the $100 bills into the cash exchange machine and get back the necessary change.

  • Custom User Avatar

    solved in an hour, and it seems like i got 2 points of honour for it.

  • Default User Avatar
  • Custom User Avatar

    Most fun kata so far! Due to all sorts of weird miscalculations I kept doing, I worked on this longer than for any other kata so far (perhaps for about 8 hours) and my solution was probably not the quickest or most elegant, but I'm happy I solved it in the end. Thanks!

  • Custom User Avatar

    Do the tests consider that bill values are indivisible in the real world? For example, a case with values new int[] {25, 25, 25, 100, 50} should be expected to return NO, because after the 4th customer you only have a 100 dollar bill and thus cannot pay the 5th customer his 25 dollars change. However, I saw that solutions that would still return YES in this situation have passed the tests.

    To enable people to start solving this problem with enough information about the premises, it would be nice to mention in the description that Vasya has a cash exchange machine that allows him to change high denomination bills into lower ones, if the tests don't consider the indivisibilty of bill denominations.