Skip to content

Commit 37b4ac4

Browse files
github-actionsgithub-actions
github-actions
authored and
github-actions
committed
fixup! Format Python code with psf/black push
1 parent 3683281 commit 37b4ac4

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

data_structures/binary_tree/binary_tree_mirror.py

+5-2
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,9 @@
77
"""
88

99

10-
def binaryTreeMirrorDict(root: int, binary_tree: dict = {}, binary_tree_mirror: dict = {}):
10+
def binaryTreeMirrorDict(
11+
root: int, binary_tree: dict = {}, binary_tree_mirror: dict = {}
12+
):
1113
if root is None or root not in binary_tree.keys():
1214
return
1315
left_child = binary_tree[root][0]
@@ -16,6 +18,7 @@ def binaryTreeMirrorDict(root: int, binary_tree: dict = {}, binary_tree_mirror:
1618
binaryTreeMirrorDict(left_child, binary_tree, binary_tree_mirror)
1719
binaryTreeMirrorDict(right_child, binary_tree, binary_tree_mirror)
1820

21+
1922
def binaryTreeMirror(root: int, binary_tree: dict = {}) -> dict:
2023
"""
2124
>>> binaryTreeMirror(1, { 1: [2,3], 2: [4,5], 3: [6,7], 7: [8,9]})
@@ -32,7 +35,7 @@ def binaryTreeMirror(root: int, binary_tree: dict = {}) -> dict:
3235

3336

3437
if __name__ == "__main__":
35-
binary_tree = { 1: [2,3], 2: [4,5], 3: [6,7], 4: [10,11], 5: [12,13],7: [8,9]}
38+
binary_tree = {1: [2, 3], 2: [4, 5], 3: [6, 7], 4: [10, 11], 5: [12, 13], 7: [8, 9]}
3639
root = 1
3740
print("Binary tree:", sep=" ")
3841
print(binary_tree)

0 commit comments

Comments
 (0)