Ad
  • Custom User Avatar
  • Default User Avatar
  • Custom User Avatar

    The description declares n to be the number of iterations, then goes on describing how the nth 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.

  • Custom User Avatar
  • Default User Avatar

    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?

  • Custom User Avatar