develop #1

Open
LebedevES wants to merge 62 commits from UNN/2026-rff_mp:develop into develop
Showing only changes of commit 28de33a83d - Show all commits

View File

@ -221,10 +221,10 @@ def bst_insert(root, name, phone):
return create_node(name, phone)
if name == root['name']:
root[phone] = phone
root['phone'] = phone
elif name < root['name']:
root['left'] = bst_insert(root['left'], name, phone)
elif name >= root['name']:
else:
root['right'] = bst_insert(root['right'], name , phone)
return root
@ -241,7 +241,7 @@ print("====== END TEST =======\n\n\n")
def bst_find(root, name):
if root is None:
return None
if name == root['name']
if name == root['name']:
return root['phone']
elif name<root['name']:
return bst_find(root['left'], name)
@ -269,7 +269,7 @@ def bst_delete(root,name):
if root['left'] is None:
return root['right']
if root['right'] is None:
return root['rihgt']
return root['right']
min_node = find_min(root['right'])
root['name'] = min_node['name']