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.
no need for zero(initialValue)
You have to track the bills, not just dollar amounts. Your's would work if they only had $25 bills. Instead he specifies they either have $25 bills, $50 bills or $100 bills. No other denominations.
C# works as does Java
You probably read the question wrong as I initially did. There are only 25, 50 and 100 dollar bills (no increments or sub-types). It took 1 for-loop and several conditionals to solve it. No other data structures, recursion or functions needed.
If he made you track different payment amounts (given as nested arrays), evaluate whether or not the value was enough and then see if he could successfully get through the line (with multiple coin and dollar amounts), then it would definitely be a 5 kyu problem...
I passed 20 out of 21. Is there ANY way for me to see what the input is on the one that is still wrong?
This was way harder than the last ten 6kyu katas I did. I think this should be at least 5kyu or even 4kyu. It requires data structures, possible recursive loops, and several functions.
If it's easy that means it should be a higher kyu number.
This comment is hidden because it contains spoiler information about the solution
Too easy. Should be 5 kyu or lower.
This is probably the cleanest, most logical solution.