Ad
  • Default User Avatar

    same issue only with random tests on Java. How did the other 339 Java users complete this?

    **I have figured it out. Everytime (I thought) I was working with a value of an element from the input array, I was changing the actual input array element, not just working with it's value. The input array stores references not values, even if I created a new (int[][] = l) it just passed the reference to that int[][]. You have to make sure that you are working with the value of the elements, because the elements are just references. That's what this Kata's Sensei means by mutating the input. Important lesson to learn I think, thanks sensei.

  • Default User Avatar