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