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.
python new test frameworks
The description declares
n
to be the number of iterations, then goes on describing how then
th cell should be processed. It seems this is however not intended, but all indices must be considered.Furthermore, although it's alluded to, there's no explicit rule stating that the array needs to have a 0 added to the front and the back.
Please adapt description.
D translation
Nice kata, but the handling of all-zero sequences seems overly strict. Since sequences are bounded by implicit 0s, any sequence consisting only of 0s is equivalent to any other (and all of them are equivalent to the empty sequence). One of the sample tests insists on the returned answer being {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, even though any other all-zero sequence would be just as correct. Maybe leading and trailing 0s should be disregarded when checking solutions?