fixed return types

This commit is contained in:
Shaurya Bisht 2024-10-13 10:40:26 +00:00
parent 8e0cc26491
commit bc6a1d169a

View File

@ -201,7 +201,7 @@ def get_balance(node: MyNode | None) -> int:
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:
return None
current_node = node
@ -369,4 +369,4 @@ if __name__ == "__main__":
random.shuffle(lst)
for i in lst:
t.del_node(i)
print(str(t))
print(str(t))