Ad
  • Custom User Avatar

    Pardon my lack of knowledge, but what do you mean by 'mutating input'? 'Cause I'm facing the same issue as you.

  • Custom User Avatar

    ok but, again, don't consider your approach as a solution (that is, if you kept it). If you keep that habit of mutating the input, you'll trigger hatred from your colleagues to be because you'll create bugs hard to track! ;)

  • Custom User Avatar

    done. You shouldn't have problems anymore. But Don't mutate the inputs!

  • Custom User Avatar

    I can confirm that the expected results should be the following:

    Red
    Red  <<< warning
    Yellow
    Red
    

    Tho, what's weird is that, when I run my solution (which expects those output), I never get any fail in the random tests. So... Are you absolutely sure you read the assertion messages correctly?

    Investigating further: the reference solution is expecting the same results. You messed something in your logs. Closing.

    (note: ooooh... Lemme guess: you mutate the input array, right? Do NEVER mutate the input. When you do so, nothing can be guaranteed anymore and you're just facing it right now. I'll update the test suite)