Skip to content

Commit 3e3d1aa

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent 58b4123 commit 3e3d1aa

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

data_structures/binary_tree/segment_tree.py

+2-3
Original file line numberDiff line numberDiff line change
@@ -95,15 +95,14 @@ def query_recursive(self, idx, left, right, a, b):
9595
q1 = self.query_recursive(self.left(idx), left, mid, a, b)
9696
q2 = self.query_recursive(self.right(idx), mid + 1, right, a, b)
9797
return max(q1, q2)
98-
98+
9999
def show_data(self):
100100
show_list = []
101-
for i in range(1, self.N + 1):
101+
for i in range(1, self.N + 1):
102102
show_list += [self.query(i, i)]
103103
print(show_list)
104104

105105

106-
107106
if __name__ == "__main__":
108107
A = [1, 2, -4, 7, 3, -5, 6, 11, -20, 9, 14, 15, 5, 2, -8]
109108
N = 15

0 commit comments

Comments
 (0)