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 bac8021 commit e7f3e0aCopy full SHA for e7f3e0a
1 file changed
data_structures/binary_tree/red_black_tree.py
@@ -3,6 +3,7 @@
3
from collections.abc import Iterator
4
from pprint import pformat
5
6
+
7
class RedBlackTree:
8
"""
9
A Red-Black tree, which is a self-balancing BST (binary search
@@ -839,12 +840,13 @@ def main() -> None:
839
840
>>> pytests()
841
842
import doctest
843
844
failures, _ = doctest.testmod()
845
if failures == 0:
846
print("All doctests passed!")
847
else:
848
print(f"{failures} doctests failed!")
-
849
850
print_results("Rotating right and left", test_rotations())
851
print_results("Inserting", test_insert())
852
print_results("Searching", test_insert_and_search())
@@ -859,4 +861,4 @@ def main() -> None:
859
861
860
862
863
if __name__ == "__main__":
- main()
864
+ main()
0 commit comments