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.
Yeah! I was wondering if this could be done without having to destructure the pair... learning so much from everyone here :)
The test case is correct, it's about the exact number of each bill you have, not the total.
After customer 5, you have five 25s. Once you get that 100, you need to give back $75 (three 25s).
You're left with one 100 and two 25s. When you get that second 100, you can't give him back $75 with two 25s and one 100.
Also on step 6, you're subtracting 75, but only adding 25.. If you have 125 and he gives you 100, you're left with 225. THEN you give him 75, and finally you'll have 150, not 75