That's because you're mutating the input, and the control function takes the same mutated input to calculate the expected value.
The input array should not be modified!
That's in the description.
Read this: https://docs.codewars.com/training/troubleshooting/#print-input
Your code returned the first, wrong value instead of the expected one.
kata level can't be changed
Loading collection data...
That's because you're mutating the input, and the control function takes the same mutated input to calculate the expected value.
That's in the description.
Read this: https://docs.codewars.com/training/troubleshooting/#print-input
Your code returned the first, wrong value instead of the expected one.
kata level can't be changed