Excuse me, can I ask everyone a question?. As I know, we can calculate sum of a sub-rectangle in a 2D-matrix in O(1) by pre-calculating a 2D-Prefix sum. So I wonder that: are there any way to calculate sum of a sub-rhombus (with R radius) in O(1) by pre-calculating? . I am a new member, sorry for any mistakes. Thanks in advance! :)
↧