We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e7f3e0a commit b6ed393Copy full SHA for b6ed393
1 file changed
data_structures/binary_tree/red_black_tree.py
@@ -353,9 +353,7 @@ def check_color_properties(self) -> bool:
353
if not self.check_coloring():
354
return False
355
# Property 5
356
- if self.black_height() is None:
357
- return False
358
- return True
+ if self.black_height() is not None
359
360
def check_coloring(self) -> bool:
361
"""Check if the tree satisfies Red-Black property 4."""
0 commit comments