Ad
  • Custom User Avatar

    With the last suggestion I think the problem is solved, I haven't the error right now.

  • Default User Avatar

    Hi MircoT,

    Still in the same problem using Ruby.

  • Custom User Avatar

    I tried to change some steps in the tests, do you still have the same problem?

  • Default User Avatar

    Same problem here in Ruby. It's returning extra zero at the beginning and end of the resulting array. Any fix/hack to get this work?

  • Default User Avatar

    Since I wanted to get through this one before waiting for a bug fix, I added the following to the top of my function to flag the random tests. Then before returning the output, I add the leading and trailing zeros if it's a random test. The arrays in "not in" are the unique starting arrays and unique iteration counts in standard tests.

    rand = False
    if o not in [[1],[1,0,0,0,1,1],[1,1,1],[0],[1,0,-1,0,1,1],[-3],[1,0,987,0,1,1],[1,1,0,1,0,1,1,1,1,1,0,1]] or n not in [1,2,21,3,5,0,-3,75]:
    rand = True

    <-----CODE------>

    if rand == True:
    o.append(0),o.append(0)
    o.insert(0,0),o.insert(0,0)

  • Default User Avatar

    I am also having this problem. Random tests have one extra zero in the beginnig and end of result array.