MCPcopy Create free account
hub / github.com/TheAlgorithms/Python / get_right_most

Function get_right_most

data_structures/binary_tree/avl_tree.py:180–186  ·  view source on GitHub ↗
(root: MyNode)

Source from the content-addressed store, hash-verified

178
179
180def get_right_most(root: MyNode) -> Any:
181 while True:
182 right_child = root.get_right()
183 if right_child is None:
184 break
185 root = right_child
186 return root.get_data()
187
188
189def get_left_most(root: MyNode) -> Any:

Callers

nothing calls this directly

Calls 2

get_rightMethod · 0.80
get_dataMethod · 0.80

Tested by

no test coverage detected