why is it failing for all testcases?
MAximum sum subaarray
I have edited your code now, basically you need to use long long int values and need to take the array of the order of 10^6 … Try to refer to this code now, I have made some changes in your code,
But why to use long long int ?
Because the constraints given in the question are much larger, which cannot be covered using int, hence we use long long int…