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.
Testcase:
[1, 3, 2, 5, 7, 9, 4, 6, 8],
[4, 9, 8, 2, 6, 1, 3, 7, 5],
[7, 5, 6, 3, 8, 4, 2, 1, 9],
[6, 4, 3, 1, 5, 8, 7, 9, 2],
[5, 2, 1, 7, 9, 3, 8, 4, 6],
[9, 8, 7, 4, 2, 6, 5, 3, 1],
[2, 1, 4, 9, 3, 5, 6, 8, 7],
[3, 6, 5, 8, 1, 7, 9, 2, 4],
[8, 7, 9, 6, 4, 2, 1, 3, 5]
is testing for the wrong value. Bug in the testcase!!!
This comment is hidden because it contains spoiler information about the solution
In the above "solution," the result does not match the Instructions, but it does pass the tests. As soon as you run the solution, however, the assertion changes for the tests from the Instruction's format "( A:10 ) - ( B:20 )" to a dictionary format "{ A:10, B:20 }". You can see this by purposing failing a run of code, looking at the failure (note the format), then copy/pasting his solution, but change return to "1" or garbage. When you run it, you'll see the format requested by the tests in a different format!
I don't know enough about TDD or the Assert library to understand this, but I would love to understand more. This solution matched mine, except that I did the proper formatting. I'm more curious why the testing got worked around than anything else. And also why people are upvoting something that isn't formatted right, smh lol!