We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f410669 commit 2dab878Copy full SHA for 2dab878
data_structures/binary_tree/binary_tree_mirror.py
@@ -19,11 +19,9 @@ def binary_tree_mirror_dict(root: int, binary_tree_mirror_dictionary: dict):
19
20
def binary_tree_mirror(binary_tree: dict = {}, root: int = 1) -> dict:
21
"""
22
- >>> binary_tree_mirror(1, { 1: [2,3], 2: [4,5], 3: [6,7], 7: [8,9]})
+ >>> binary_tree_mirror({ 1: [2,3], 2: [4,5], 3: [6,7], 7: [8,9]}, 1)
23
{1: [3, 2], 2: [5, 4], 3: [7, 6], 7: [9, 8]}
24
- >>> binary_tree_mirror(5, { 1: [2,3], 2: [4,5], 3: [6,7], 7: [8,9]})
25
- {}
26
- >>> binary_tree_mirror(1, { 1: [2,3], 2: [4,5], 3: [6,7], 4: [10,11]})
+ >>> binary_tree_mirror({ 1: [2,3], 2: [4,5], 3: [6,7], 4: [10,11]}, 1)
27
{1: [3, 2], 2: [5, 4], 3: [7, 6], 4: [11, 10]}
28
29
if not binary_tree:
0 commit comments