Maximum sub-array sum in the challenge section

I used Kadane’s algorithm to solve the problem but it is giving a run-time error.
Please help me solving this.