Skip to content

Commit b96aefe

Browse files
anirudnitscclauss
andauthored
Update data_structures/binary_tree/wavelet_tree.py
Add doctests to placate the algorithm-bot, thanks to @cclauss. Co-authored-by: Christian Clauss <[email protected]>
1 parent 5de688b commit b96aefe

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

data_structures/binary_tree/wavelet_tree.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,13 @@ def __init__(self, length: int) -> None:
2020
self.right: Optional[Node] = None
2121

2222
def __repr__(self) -> str:
23+
"""
24+
>>> node = Node(length=27)
25+
>>> repr(node)
26+
'min_value: -1, max_value: -1'
27+
>>> repr(node) == str(node)
28+
True
29+
"""
2330
return f"min_value: {self.minn}, max_value: {self.maxx}"
2431

2532

0 commit comments

Comments
 (0)