Skip to content

Commit 19e3f3c

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent 13d22f2 commit 19e3f3c

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

data_structures/binary_tree/red_black_tree.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -231,10 +231,10 @@ def remove(self, label: int) -> RedBlackTree:
231231
True
232232
"""
233233
if self.label == label:
234-
if self.left and self.right:
235-
# It's easier to balance a node with at most one child,
236-
# so we replace this node with the greatest one less than
237-
# it and remove that.
234+
if self.left and self.right:
235+
# It's easier to balance a node with at most one child,
236+
# so we replace this node with the greatest one less than
237+
# it and remove that.
238238

239239
value = self.left.get_max()
240240
if value is not None:
@@ -272,7 +272,7 @@ def remove(self, label: int) -> RedBlackTree:
272272
elif self.right:
273273
self.right.remove(label)
274274
return self.parent or self
275-
275+
276276
def _remove_repair(self) -> None:
277277
"""Repair the coloring after removal."""
278278
if (

0 commit comments

Comments
 (0)