标签:ice mutable des structure ati nta out sim targe
参见 307. Range Sum Query - Mutable
Tree Implementation (SegmentTreeNode)
https://www.youtube.com/watch?v=rYBtViWXYeI&list=PLLuMmzMTgVK7ug02DDoQsf50OtwVDL1xd&index=1
https://leetcode.com/problems/range-sum-query-mutable/discuss/75711/C++-Segment-Treeupdate-and-sum-are-both-O(logn)
Array Implementation
Since a Segment Tree is a binary tree, a simple linear array can be used to represent the Segment Tree.
https://leetcode.com/articles/a-recursive-approach-to-segment-trees-range-sum-queries-lazy-propagation/
https://www.hackerearth.com/zh/practice/data-structures/advanced-data-structures/segment-trees/tutorial/
Segment Tree / Binary Indexed Tree
标签:ice mutable des structure ati nta out sim targe
原文地址:https://www.cnblogs.com/hankunyan/p/11188273.html