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.
updated Ruby translation -- please check and approve
Ruby submit tests seem to be broken at least as far as error reporting goes.
With this (trivially wrong) solution:
I get
832 matches the target, if it's the target printed in the log, we don't know.., but even that should not be the expected value, that should be an index pair. 1406 seems to be the sum this solution gets.
Fair enough, point taken. Thanks.
@wthit56, C and Java translations ready.
"Input is valid" means input is array, array is in correct length and the values in the array is valid. It does not mean there are no extra properties.
If your code would break because of extra properties unrelated to everything else, maybe you need to use better practices ;-)
Are you using for ... in? The prop is not inside the array, it's added to it, the items inside the array are all numbers.
I guess it's there to teach you not to use it with arrays.
Something very odd about this kata
all but one test passed, the failed test gives the error -
[ 0, 1, 2, prop: 3 ] 3 Array with added property - Expected: '[1, 2]', instead got: '[0, NaN]'
yet in the instructions it clearly states
so what the hell is
prop: 3
and why is it in the array?