Visitar URL original
Algorithm/segment_tree.md at master · bboychencan/Algorithm · GitHub
Skip to content

Latest commit

 

History

History
19 lines (12 loc) · 471 Bytes

segment_tree.md

File metadata and controls

19 lines (12 loc) · 471 Bytes

Segment Tree

Material

https://www.jianshu.com/p/91f2c503e62f

Coordinates compression

It could reduce the tree size very much

leetcode 699. Falling Squares

Lazy Propagation

练习leetcode

练习了两道题,感觉基本掌握了segment tree 308. Range Sum Query 2D - Mutable 307. Range Sum Query - Mutable

但是感觉segment写起来很笨重,一大堆的操作和helper函数,看到很多BIT的写法更加的精简,值得仔细研究一下