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.
For that test you can't give change for the 100 dollars bill with two 50 dollars bills.
even for this [25, 25, 50, 50, 100] it should be returning a 'YES' instead says 'NO'
Either reading the logs or the error message wrong. The log appears above the test result and 'NO' should equal 'YES' means your function returned 'NO' instead of the expected 'YES'.
This is the test and you can see it expects 'YES'
test.assert_equals(tickets([25, 25, 25, 100]), "YES")
for [25 25 25 100]
the answer is 'YES' but says to return 'NO'
balance 1st =25
then balance = 50
then = 75
and 100 - 25 =75
so it should be 'YES'
am i doing it right
This comment is hidden because it contains spoiler information about the solution
Im finally understood it. Sorry
Yes, the expected results are ok and you're returning them wrong, analyze why. You're not using all bills to give change it seems.
Test 6 with data 25 25 50 100 returns YES when there is actually NO answer. Same for test 17 with data 25 25 25 25 50 100 50 and it returns YES when actually there is NO. Am I really calculated it wrong?
Print the input, the tests are ok. When the problem is in your code, use
Question
label instead.Im passed all the tests exluding 6 and 17 ones using C#. Is there a way to look at this tests? How can I figure out what is wrong with my program?
UPD: Test 17: Log 25 25 50 100; My result: NO; Test: YES.