medium10 pts · first answer countsarraysprefix-sumsmatrix
Rectangle sum from a 2D prefix table
P[i][j] is the sum of cells above and left of (i, j), exclusive, with an extra zero row and column. Which formula gives the sum of rows r1..r2 and columns c1..c2?
Discussion 0
Join free to post in the discussion.
Related questions
- Cost of reading arr[i]Backend Developer
- Inserting at the front of an arrayBackend Developer
- Why push is amortized O(1)Backend Developer
- Changing one character of a stringBackend Developer
- Reversing a simple stringBackend Developer
- slice vs spliceBackend Developer
- Index of the last elementBackend Developer
- indexOf and NaNBackend Developer