Skip to content

Commit b6ed393

Browse files
authored
Update red_black_tree.py
1 parent e7f3e0a commit b6ed393

1 file changed

Lines changed: 1 addition & 3 deletions

File tree

data_structures/binary_tree/red_black_tree.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -353,9 +353,7 @@ def check_color_properties(self) -> bool:
353353
if not self.check_coloring():
354354
return False
355355
# Property 5
356-
if self.black_height() is None:
357-
return False
358-
return True
356+
if self.black_height() is not None
359357

360358
def check_coloring(self) -> bool:
361359
"""Check if the tree satisfies Red-Black property 4."""

0 commit comments

Comments
 (0)