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.
Thanks for clarification, Chrono79!
Now test #2 is gone (I dunno how and where) and I change my solution logic for test #1. It works :-)
Not a kata issue, wrong answer subtracts 1, for the first one 7 is ok as expected answer,
0 - 1 + 4 + 4 == 7
, the second one does seem wrong, but I checked the control function for Ruby and it would expect 3 for that test too, are you sure of that test?There are some incorrect tests in the kata, for example:
checkExam(["b", "a", "c", "b"], ["", "b", "c", "b"]) # test expect 7, but correct answer 8 (0-1(→0)+4+4)
checkExam(["c", "d", "a", "a"], ["", "", "a", "c"]) # test expect 2, but correct answer 3 (0+0+4-1)
wonderful and clear decision, great!