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.
Also, the idea behind reminding the user to return an array where length === input.length + 1 was another way of aligning the zero-indexed arrays with the nature of the kata. Basically, the test was trying to make sure the user didn't forget to include the first null/nil of the array.
Sorry. Are we referring to the second describe block in the Sample Test Cases? Just want to make sure it's somewhere!
This is missing from the Ruby translation and the expected length was not clear.
Much appreciated!
I hear you. The test cases in the example test case might've helped, too! There were ten sample test cases in that section, as well as a describe block explaining: "Your solution should return an array with a length of input.length + 1"!
I'll keep that in mind for next time, though :)
I liked the Kata even tho my solution ended up being probably fairly inelegant and inneficient.
The only problem i have with it is i found the exemple given in the description lacking, at first i thought only number from 1-9 could appear in the array and that the returned array should always be of length 10. Had to hack and duck tape my original solution. but its still a nice problem maybe if you gave an example that show an integer above 9 in the array to pass through the function airheads like me would get the problem faster :p.