Ad
  • Default User Avatar

    APPROVED BY SOMEONE

  • Default User Avatar

    Thanks for updating the kata, B4B. Since you modified my solution used in validating others' solutions in the tests, I thought at first that it was mutating the input. But it isn't and I don't think that that change is necessary. However, I agree with the other changes that protect the tests from others mutating the input.

  • Custom User Avatar

    done.

    keep in mind that mutating the input is a VERY bad practice. As you just faced it.

  • Custom User Avatar

    the tests are "correct", the problem is that you're mutating the input array. I'll update the kata in a matter of minutes.

    about the buffer problem, it's because the assertions are prinintg all the expected results to the console. That's enough to saturate it, in this kata.

  • Custom User Avatar

    You're probably printing too much to the console, remove all prints from your code. Also, if all random tests fail, I'd check if you're not mutating the input. Can't help you better because I haven't solved this kata yet.