Ad
  • Custom User Avatar

    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.

  • Custom User Avatar

    Sorry. Are we referring to the second describe block in the Sample Test Cases? Just want to make sure it's somewhere!

  • Custom User Avatar

    Your solution should return an array with a length of input.length + 1

    This is missing from the Ruby translation and the expected length was not clear.

  • Custom User Avatar

    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 :)

  • Custom User Avatar

    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.