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

Function get_height

data_structures/binary_tree/avl_tree.py:75–78  ·  view source on GitHub ↗
(node: MyNode | None)

Source from the content-addressed store, hash-verified

73
74
75def get_height(node: MyNode | None) -> int:
76 if node is None:
77 return 0
78 return node.get_height()
79
80
81def my_max(a: int, b: int) -> int:

Callers 5

right_rotationFunction · 0.85
left_rotationFunction · 0.85
insert_nodeFunction · 0.85
del_nodeFunction · 0.85
get_heightMethod · 0.85

Calls 1

get_heightMethod · 0.45

Tested by

no test coverage detected