Max subarray sum coming out wrong
Hi Divyam, I’ve made some small changes in your code like changing the data type to long instead of int because of the given constraints, changing the condition to if(cs<0) instead of if(a[i]<0). Now the code is giving correct answer and you can refer to it here https://ide.codingblocks.com/s/64538.