Ad
  • Default User Avatar

    I encountered the same problem (with the very obvious answer in Ruby), and hadn't a clue how to fix (circumvent) the problem in the test cases. While debugging, I put a p string as the first line in the method... and got the solution accepted. You might want to try that.

  • Custom User Avatar

    I got that also. I don't how I can fix that.

  • Custom User Avatar

    Please fix!

  • Custom User Avatar

    depends how the tests are written, sometimes the same object is passed into your solution and a validating solution. So if you modify the array the validting solution will get your modified version and will return a different result than expected.

    it's good to stay safe and make a copy of any objects passed in usually :)

  • Custom User Avatar

    make sure you're not modifying any parameters, make a copy of the map array and use that.