mirror of
https://github.com/TheAlgorithms/Python.git
synced 2025-04-07 22:35:54 +00:00
improved del_node func(5)
This commit is contained in:
parent
64822ac0d3
commit
ab084df119
@ -208,7 +208,7 @@ def get_min_value_node(node: MyNode) -> MyNode:
|
|||||||
return current
|
return current
|
||||||
|
|
||||||
|
|
||||||
def del_node(root: Optional[MyNode], data: Any) -> Optional[MyNode]:
|
def del_node(root: MyNode | None, data: Any) -> MyNode | None:
|
||||||
if root is None:
|
if root is None:
|
||||||
print("Nothing to delete")
|
print("Nothing to delete")
|
||||||
return None
|
return None
|
||||||
|
Loading…
x
Reference in New Issue
Block a user