Is this technique only work when in arr [ ] have 0th value = = 0;

Is this technique only work when in arr [ ] have 0th value = = 0;
is so what is the point to read this we don’t have 0 as a 0th term many times ?

When I make 0th term non-zero it gave different max sum of subarray.

hi @mahroosanwar0901_2642b14836027bbf
we have assigned 0 at the 0th index just to avoid segmentation error… that’s all…

hi @mahroosanwar0901_2642b14836027bbf
is there anything else?? shall i mark the doubt as resolved??

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.