mirror of
https://github.com/TheAlgorithms/Python.git
synced 2025-02-25 02:18:39 +00:00
Update data_structures/binary_tree/basic_binary_tree.py
Co-authored-by: Christian Clauss <cclauss@me.com>
This commit is contained in:
parent
0b20f110a1
commit
0f29543d3c
@ -24,7 +24,7 @@ def display_tree(root: Node | None, level: int = 0) -> None:
|
|||||||
"""
|
"""
|
||||||
if root:
|
if root:
|
||||||
display_tree(root.right, level + 1)
|
display_tree(root.right, level + 1)
|
||||||
print(" " * level + str(root.data))
|
print(f"{' ' * level}{root.data}")
|
||||||
display_tree(root.left, level + 1)
|
display_tree(root.left, level + 1)
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user