Confusion when i=0

how will we find the sum of the sub array when i=0;
like -4 1 3 -2 6 2 -1 -4 -7 is the array when i=0 then for sum the formula is csum[0]-csum[-1] , that does make sense.
I think i have a problem in the concept may be

hello @sahasoumyajit2020
u need to handle i=0 case seprately.
put an if statement and handel it.

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.