Skip to content

Commit c161fee

Browse files
authored
fix imports red_black_tree.py
1 parent a65574b commit c161fee

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

data_structures/binary_tree/red_black_tree.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
from __future__ import annotations
22

33
from collections.abc import Iterator
4-
from pprint import pformat
54

65

76
class RedBlackTree:
@@ -652,6 +651,7 @@ def postorder_traverse(self) -> Iterator[int | None]:
652651

653652
def __repr__(self) -> str:
654653
"""Return a string representation of the tree."""
654+
from pprint import pformat
655655
if self.left is None and self.right is None:
656656
return f"'{self.label} {(self.color and 'red') or 'blk'}'"
657657
return pformat(

0 commit comments

Comments
 (0)