Maximun subarray sum 2

https://ide.codingblocks.com/s/6573

in this code how cumulative_sum[ j ] get calculated automathically although we have not used any function to calculate the cumulative sum;

Hi Ankush, work on your logic for this question, check the output format properly and remove extra statements from your code which aren’t needed.

Also, cumSum[i] = cumSum[i-1] + a[i];
This line in your code is calculating the sum of all elements of the array.