Query related to using sum[n+1]

just a query that why have we used sum[n+1] rather than sum[n] when we have to store just n elemets in sum array

…

u can use n as well, while debuging i changed its size.

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.