in this video at 5:45 when he is calculating prefix sum for index(2,2] why it is not 2a+2b+c+2d+2e+f+g+h ??
Doubt in prefix sum matrix calculation
hi @Tanishq_Gupta
in prefix sum matrix
pre[i][j] represent sum of all elements of matrix (0,0) to (i.j)
so pre[2][2]=a+b+c+d+e+f+g+h
i hope this helps
but as he is doing it should be 2a+2b+c+2d+2e+f+g+h