for sub array we are using two loops , on the line cursum=cumsum[j]-cumsum[i-1], how the value of cumsum[i-1] is defined for i=0.
CPP - Maximum Subarray Sum 2
@Bipin-Jaiswal-810736989294685 yeah, you are right in this question there is some mistake. you can refer to these lines of codes link..