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.
Ok. I'll check it again
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
Looks like random tests don't work correctly in javascript variant.
If I understood instructions correctly, for this test
makeChocolates(58, 156, 283)
result must be 4:
55 * 5 + 4 * 2 = 283
But I didn't pass this test.
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
Why in case of this input
[ null, <1 empty item>, undefined, null, 0, '', <1 empty item>, [ <3 empty items> ], [] ]
function should return
[[null], [null, null, 0, ""], [[null, null, null], [] ]]
instead of
[ [ null ], [ undefined, null, 0, '' ], [ [ <3 empty items> ], [] ]
?I think it's a mistake in kata.