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.
I bet you edited the sample tests. Copy your code, then reset the trainer.
Ok. I'll check it again
why do I see the height and width arguments being 5 and 5 at the end of your input...? with clues asking for 6...?
=> I don't know what you messed up in your logs but you messed it up. And I'm pretty sure the problem is on your side... check then resolve the issue.
Tests are incorrect. For examle in this test size of grid shold be 6x11. I can obtain the size from keys, but still my solution isn't accepted. Though my solution is correct
solve([
[ [ 3 ], [ 4 ], [ 2, 2, 2 ], [ 2, 4, 2 ], [ 6 ], [ 3 ] ],
[
[ 4 ], [ 6 ],
[ 2, 2 ], [ 2, 2 ],
[ 2 ], [ 2 ],
[ 2 ], [ 2 ],
[], [ 2 ],
[ 2 ]
]
],5 ,5)
My solution:
01110000000
11110000000
11000011011
11001111011
11111100000
01110000000
Moved all
assert
s toassert.equal
.And thank you for improving the asserts.
Seems fixed.
Thank you very much for your fix.
Also fixed announcing
1 000
random tests and then running5 000
. I was triggered by there being more than1 000
random tests with goal under5
..Fixed.
Math.round(Math.random()*2)
gives values from0
to2
inclusive. Either useMath.floor
or lose the*2
. ( I opted forround
. )( JS, possibly others )
Please don't use
assert
. Useassert.equal
and automatically give a useful error message on failure, with actual and expected value ( we can always print inputs ourselves ).Everybody who used
Test.expect
has been screamed at for six years, and now we have to scream at people for using bareassert
? Please.JS: the random generator has some troubles:
I have fixed the solution. Plesae check now.
Loading more items...