for first case when i=0 and j=i that means j=0 as well,what would be value of currentsum as currentsum=cumsum[j]-cumsum[i-1],so what would be the value of cumsum[i-1]
Maximum subarray sum using cumulative sum
hello @shubhangis248
some compiler allows negative indices(their values depends on compiler) but it is not good practice.
handle i==0 case separately for such case currsum=cumsum[j] only
Hey @shubhangis248
Did 2 changes in your code and mentioned the changes in comments: https://ide.codingblocks.com/s/352812 
Oh sorry … wanted to mark her in username 
