Skip to content

Commit 9725d2c

Browse files
committed
fixed build ret
1 parent aa29625 commit 9725d2c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

data_structures/binary_tree/segment_tree_node.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ def build(self, start: int, end: int, nums: list[int]) -> Node:
3232
:return: Root node of the constructed subtree.
3333
"""
3434
if start > end:
35-
return
35+
return Node(0, 0)
3636

3737
if start == end:
3838
# Leaf node
@@ -156,4 +156,4 @@ def modify(
156156
if self.mode == "max":
157157
node.value = max(node.left.value, node.right.value)
158158
else:
159-
node.value = node.left.value + node.right.value
159+
node.value = node.left.value + node.right.value

0 commit comments

Comments
 (0)