@6.58 line 38 statement is current_sum=Cumulative_sum[j]-Cumlative_sum[i-1]
here i is starting from from 0 if we do 0-1=-1 so what is Cumlative_sum[-1]???
Maxmimum array doubt
there is slight mistake in the video you need to add a if condition to make sure that cumulative_sum[-1] is not accessed
Code
(i==0)?current_sum=cumsum[j]:current_sum=cumsum[j]+cumsum[i-1];
is this condition right???
yes the condition is correct.