Max Subarray Sum problem

The code for the challenge problem is compiling and running perfectly on coding blocks IDE. Sample test cases as given in question is also giving correct output. But no test case is passing upon submission of code. Can you please tell me whats wrong with my solution: link is given below

In the question it is mentioned
Constraints

1 <= N <= 100000

But you have restricted your array size to 100. Increase that to 100000 and then check.

Also the loop for test cases is i. So do not take the inner loop also as i. Take it as some other variable.

Thanks. It is working now

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.