CumSum[i-1] for i=0th iteration

How is it not taking any garbage value for the first iteration(ie, i=0)

Hi Stuti, pls save your code on ide.codingblocks.com and then share the url here so that we can help you out asap :slight_smile:.

@StutiSharma741 hey stuti because prateek bhaiya already strore cumSum[0]=a[0] and loop start from 1 to n so it will not take any garbage value

Hey Stuti,
As you are not responding to this thread, I am marking your doubt as Resolved for now. Re-open it if required.

Please mark your doubts as resolved in your course’s “ Ask Doubt ” section, when your doubt is resolved.