Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 0f5718f

Browse files
committedOct 19, 2024·
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent 04b44c4 commit 0f5718f

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed
 

‎data_structures/persistent_segment_tree.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -119,13 +119,15 @@ def _query(self, node: Node, start: int, end: int, left: int, right: int) -> int
119119
if left <= start and right >= end:
120120
return node.value
121121
mid = (start + end) // 2
122-
return (self._query(node.left, start, mid, left, right) +
123-
self._query(node.right, mid + 1, end, left, right))
122+
return self._query(node.left, start, mid, left, right) + self._query(
123+
node.right, mid + 1, end, left, right
124+
)
124125

125126

126127
# Running the doctests
127128
if __name__ == "__main__":
128129
import doctest
130+
129131
print("Running doctests...")
130132
result = doctest.testmod()
131133
print(f"Ran {result.attempted} tests, {result.failed} failed.")

0 commit comments

Comments
 (0)
Please sign in to comment.