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.
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
For me personally, the second option is better suited for visualization in my head.
And as for the first option, it's strange that only 3 of the 7 values are displayed in this way.
I think -> 3+4 6+7 9+1 2+3 4+5 6+7 clearly shows what values are used and no further clarification is required.
It's written like that to separate the head and the tail of those numbers.
You got an array
[123,456,789,12,34,56,78]
.First, from left to right, the tail of an element and the head of the next element are added together. The results are put into an array. like this:
Would this be better?
In the example, there are 3 extra spaces inside the array, which results in an array with invalid numbers -> 1 2, 3 4, 5 6 instead of 12, 34, 56.
Although this does not directly affect the kata, it may confuse the reader.
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
ha ha, my decision was not accepted only because i moved "use strict" from the function to the first line of code, and the tests gave out all sorts of nonsense. But as soon as i returned "use strict" back inside the function, my decision immediately became correct) Funny kata(no).
There is no issue. In both cases you should return an empty array. The description only states what to do if you get an empty array as input, then you should always return an array without a single element, and with an array with only one element the answer is an empty array too.
Loading more items...