mirror of
https://github.com/TheAlgorithms/Python.git
synced 2025-04-08 14:55:53 +00:00
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
This commit is contained in:
parent
0622d4bbff
commit
8e0cc26491
@ -230,7 +230,9 @@ def del_node(root: MyNode | None, data: Any) -> MyNode | None:
|
|||||||
root.set_data(temp.get_data())
|
root.set_data(temp.get_data())
|
||||||
root.set_right(del_node(root.get_right(), temp.get_data()))
|
root.set_right(del_node(root.get_right(), temp.get_data()))
|
||||||
|
|
||||||
root.set_height(1 + my_max(get_height(root.get_left()), get_height(root.get_right())))
|
root.set_height(
|
||||||
|
1 + my_max(get_height(root.get_left()), get_height(root.get_right()))
|
||||||
|
)
|
||||||
|
|
||||||
balance = get_balance(root)
|
balance = get_balance(root)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user