Skip to content

Commit 55186e8

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent ba1752e commit 55186e8

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

data_structures/advanced_trie.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -174,13 +174,13 @@ def _delete_helper(self, node: TrieNode, word: str, index: int) -> bool:
174174
def _find_node(self, word: str) -> Optional[TrieNode]:
175175
"""
176176
Find the node corresponding to the given word.
177-
177+
178178
Args:
179179
word: Word to find node for
180-
180+
181181
Returns:
182182
TrieNode if found, None otherwise
183-
183+
184184
Examples:
185185
>>> trie = Trie()
186186
>>> trie.insert("hello")
@@ -230,12 +230,12 @@ def _collect_words(
230230
) -> None:
231231
"""
232232
Collect all words from a given node.
233-
233+
234234
Args:
235235
node: Current trie node
236236
current_word: Current word being built
237237
words: List to collect words into
238-
238+
239239
Examples:
240240
>>> trie = Trie()
241241
>>> trie.insert("hello")

data_structures/segment_tree.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -107,17 +107,17 @@ def query(self, left: int, right: int) -> int:
107107
def _query(self, node: int, start: int, end: int, left: int, right: int) -> int:
108108
"""
109109
Internal query method.
110-
110+
111111
Args:
112112
node: Current node index
113113
start: Start of current segment
114114
end: End of current segment
115115
left: Left boundary of query
116116
right: Right boundary of query
117-
117+
118118
Returns:
119119
Result of the operation over the range
120-
120+
121121
Examples:
122122
>>> st = SegmentTree([1, 2, 3, 4, 5])
123123
>>> st._query(0, 0, 4, 1, 3)
@@ -261,15 +261,15 @@ def _range_update(
261261
) -> None:
262262
"""
263263
Internal range update method with lazy propagation.
264-
264+
265265
Args:
266266
node: Current node index
267267
start: Start of current segment
268268
end: End of current segment
269269
left: Left boundary of update
270270
right: Right boundary of update
271271
delta: Value to add to the range
272-
272+
273273
Examples:
274274
>>> lst = LazySegmentTree([1, 2, 3, 4, 5])
275275
>>> lst._range_update(0, 0, 4, 1, 3, 2)

0 commit comments

Comments
 (0)