At line 35 , we are referring cumsum[i-1] but i starts from 0 so it will refer to cumsum[-1] , this should give an error ??
Max Subarray sum cumulative sum approach
hello @Sankalp-Tiwari-2027061737381863 as there are no negative indexing in python so yes that will definitely give error.
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.
