Skip to content

Commit 7d7e68c

Browse files
committed
add test to invert_binary_tree
1 parent c159f6e commit 7d7e68c

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

data_structures/binary_tree/invert_binary_tree.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,10 @@ def mirror_binary_tree(self, root : TreeNode):
4141
0
4242
20
4343
10
44+
>>> tree2 = TreeNode(9)
45+
>>> result_tree2 = MirrorBinaryTree().mirror_binary_tree(tree2)
46+
>>> print_preorder(result_tree2)
47+
9
4448
"""
4549

4650
if not root:

0 commit comments

Comments
 (0)