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.
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.
solved in an hour, and it seems like i got 2 points of honour for it.
Great kata!
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!
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.