Maximum subarray sum


tried using long long int datatype even then it shows failed test cases

@purnima11 n can be upto 10^5 but you have taken your array size as 10^3.change your array size and try again.

it still doesn’t work . please tell me what is wrong

what you are doing was not the efficient way for this problem, i have updated your code look at this for help (https://ide.codingblocks.com/s/221649).

1 Like