Code running but test cases not clearing

code running but test cases not clearing… sir pls tell whats the error in code

this may happen because of
Constraints

1 <= N <= 100000

1 <= t <= 20

-100000000 <= A[i] <= 100000000

so change size of array and use long long int
instead of using int

but after that it will give TLE because
you use brute force approach

use kadan’s Algorithm to pass all testcases

sir still test cases not running

as i mention now it will give TLE

now you have to optimize you code
you can use kadan to pass all testcase

okay…let me try that

sir used kadans algo but still test cases not passing … please check it once

as i have already mention
please go through this

tried that as well … still not working… sir please can u make the changes in the code and share with me

you have not done all chages that i have told you
you don’t change size of array according to constraints

modifed code is
this is running all test case i have check

i hope you understand
for future please see constraints also

sir but why n has to be long long int… given 1 <= N <= 100000… and int has this range

yes @Vaibhav277
this is in range of int

but i am taking about size of array

you have write
long long int arr[100]

correct one should be
long long int arr[100000]