Doubt regarding the code

when I = 0 the the statement we do currents = scum[j]-csum[I-1] but this means scum[0]-csum[-1.what is meant by csum[-1] we are passing negative index I didn’t understand that

hello @av8055
thats a corner case. handle it seprately using if and else

if(i>0)
curr_sum= csum[ j] -csum[i-1];
else 
curr_sum= csum[ j]