Ad
  • Custom User Avatar

    your solution has a bug that incorrectly handles four zeros in sequence
    example input data [9, 0, 0, 0, 0, 0, 9]
    your code will return [ 9, 0, 9, 0, 0, 0, 0, 0 ]

  • Custom User Avatar

    Hi I checked
    your code gives wrong result for
    this sequence [9, 0, 0, 0, 9, 1, 2, 0,
    1, 0, 1, 0, 3, 0, 0, 1,
    9, 0, 0, 0, 0, 0, 0, 9] can you check locally

    javascript kata tests output incorrectly expected results and obtained results from the user

  • Custom User Avatar

    you shouldn't post code like that; anyone can see it.

    I added the spoiler flag to your comment