01. 线段树知识 #104
Replies: 4 comments 2 replies
-
3.2 部分 线段树的区间查询,为什么有个 |
Beta Was this translation helpful? Give feedback.
-
def __update_interval(self, q_left, q_right, val, index, left, right):
这端代码中 |
Beta Was this translation helpful? Give feedback.
-
似乎动态开点的code有bug, 如果function取求和函数,先update [20, 28] 每个数加一,然后再去搜索[27, 29]的值,会得到0 |
Beta Was this translation helpful? Give feedback.
-
请问大家有没有推荐看的视频关于线段树的,这章对新手不太友好。 |
Beta Was this translation helpful? Give feedback.
-
01. 线段树知识
right 通常是整数。每一个叶子节点表示了一个单位区间(长度为 1
),叶子节点对应区间上 left == right。每一个非叶子节点 [left, ...https://algo.itcharge.cn/07.Tree/03.Segment-Tree/01.Segment-Tree/
Beta Was this translation helpful? Give feedback.
All reactions