Range sum in 3-Dimension

Revision en12, by 3_Problems_Everyday, 2017-07-08 20:11:36

In 1-D we can find sum in range [l, r] using sum[r] - sum[l - 1].

In 2-D we can find sum in range from (x1, y1) to (x2, y2) using sum[x2][y2] - sum[x2][y1] - sum[x1][y2] + sum[x1][y1] where sum[] or sum[][] is cumulative sum .

How to find sum in range from (x1, y1, z1) to (x2, y2, z2) in a similar way ?

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en12 English 3_Problems_Everyday 2017-07-08 20:11:36 0 (published)
en11 English 3_Problems_Everyday 2017-07-08 20:10:02 5 Tiny change: ' in range $ (x1,y1' -> ' in range from $ (x1,y1'
en10 English 3_Problems_Everyday 2017-07-08 20:09:06 15
en9 English 3_Problems_Everyday 2017-07-08 20:07:31 24
en8 English 3_Problems_Everyday 2017-07-08 20:06:25 5
en7 English 3_Problems_Everyday 2017-07-08 20:04:33 5
en6 English 3_Problems_Everyday 2017-07-08 20:00:05 4 Tiny change: 'sum[l-1] \n\nIn 2-D w' -> 'sum[l-1] \\\nIn 2-D w'
en5 English 3_Problems_Everyday 2017-07-08 19:57:17 18
en4 English 3_Problems_Everyday 2017-07-08 19:56:42 6
en3 English 3_Problems_Everyday 2017-07-08 19:55:36 11 Tiny change: '-sum[l-1] \newline\nIn 2-D w' -> '-sum[l-1] <\br>\nIn 2-D w'
en2 English 3_Problems_Everyday 2017-07-08 19:52:23 18
en1 English 3_Problems_Everyday 2017-07-08 19:51:38 313 Initial revision (saved to drafts)