Ad
  • Custom User Avatar

    Thank you for the response.

    I used C and my solution does change the input inplace as the output type signature is marked as void.

  • Custom User Avatar

    I can't tell what language you are using, but I would suggest checking to see if your code mutates the input (since that can be reflected in poorly written tests).

    If so, please let us know so it can be fixed (and also: don't mutate the input)

  • Custom User Avatar

    I got stuck in this test case:

    for array:
    {0, 1, 0, 2, 0, 3, 4, 5}
    expected:
    {1, 2, 3, 4, 5, 1, 2, 3}
    

    which is clearly wrong...