Monday, October 16, 2017

[LeetCode]Range Sum Query 2D - Mutable


2D Range Query问题,可以用2D Segment TreeQuad Tree或者2D Binary Index Tree来解决,具体数据结构讲解和时间复杂度分析请参考对应链接。

2D Segment Tree解法:

Quad Tree解法:

2D Binary Index Tree解法:


No comments:

Post a Comment