Subarray contain 1st element of the array

i am not getting correct answer if the subarray should also include 1st element of array. for eg if we have 4 instead of -4 as a[0]. answer should be 14 but i get it as 10.

@vvvipul007
approach is correct.u need to handle one corner case when i=0;
in that case sum=cusum[j] only .
share your code too