Ad
  • Custom User Avatar

    That would make sense. The only issue is that I still have some tests passing with more than one number input arrays.

    Edit: Ignore this, I copied the array and it works fine.

  • Custom User Avatar

    My JavaScript code fails 91 tests. All of these test cases have more than one number and say they were expecting zero. I've gone through some of the smaller ones by hand and the answer from my code seems to be right.

    Edit: Apart from the special cases, surely it's only possible for the answer to be zero if all the numbers in the array are the same.