it does not work with [5,0,0,0,0], [0,0,0,0,5] and [20,10,-80,10,10,15,35]
your result -1 -1 -1
should beat the result 0 4 0
because
Last one:
You are given the array {20,10,-80,10,10,15,35}
At index 0 the left side is {}
The right side is {10,-80,10,10,15,35}
They both are equal to 0 when added. (Empty arrays are equal to 0 in this problem)
Index 0 is the place where the left side and right side are equal.
Yes! And the author of this Kata made the same mistake.
it does not work with [5,0,0,0,0], [0,0,0,0,5] and [20,10,-80,10,10,15,35]
your result -1 -1 -1
should beat the result 0 4 0
because
Last one:
You are given the array {20,10,-80,10,10,15,35}
At index 0 the left side is {}
The right side is {10,-80,10,10,15,35}
They both are equal to 0 when added. (Empty arrays are equal to 0 in this problem)
Index 0 is the place where the left side and right side are equal.
Error with 12.0 1234.0
12.0
1234.0