mirror of
https://github.com/TheAlgorithms/Python.git
synced 2025-04-07 06:15:55 +00:00
fixed return types
This commit is contained in:
parent
8e0cc26491
commit
bc6a1d169a
@ -201,7 +201,7 @@ def get_balance(node: MyNode | None) -> int:
|
|||||||
return get_height(node.get_left()) - get_height(node.get_right())
|
return get_height(node.get_left()) - get_height(node.get_right())
|
||||||
|
|
||||||
|
|
||||||
def get_min_value_node(node: MyNode | None) -> MyNode | None:
|
def get_min_value_node(node: MyNode) -> MyNode:
|
||||||
if node is None:
|
if node is None:
|
||||||
return None
|
return None
|
||||||
current_node = node
|
current_node = node
|
||||||
@ -369,4 +369,4 @@ if __name__ == "__main__":
|
|||||||
random.shuffle(lst)
|
random.shuffle(lst)
|
||||||
for i in lst:
|
for i in lst:
|
||||||
t.del_node(i)
|
t.del_node(i)
|
||||||
print(str(t))
|
print(str(t))
|
Loading…
x
Reference in New Issue
Block a user