mirror of
https://github.com/TheAlgorithms/Python.git
synced 2025-02-17 14:58:10 +00:00
edited else-if to elif
This commit is contained in:
parent
fb53ab85f6
commit
240acd1448
|
@ -220,12 +220,11 @@ def del_node(root: MyNode, data: Any) -> MyNode | None:
|
|||
return root
|
||||
else:
|
||||
root.set_left(del_node(left_child, data))
|
||||
elif right_child is None:
|
||||
print(f"No such data ({data}) exists in the right subtree.")
|
||||
return root
|
||||
else:
|
||||
if right_child is None:
|
||||
print(f"No such data ({data}) exists in the right subtree.")
|
||||
return root
|
||||
else:
|
||||
root.set_right(del_node(right_child, data))
|
||||
root.set_right(del_node(right_child, data))
|
||||
|
||||
# Update the height of the node
|
||||
root.set_height(
|
||||
|
|
Loading…
Reference in New Issue
Block a user