mirror of
https://github.com/autistic-symposium/master-algorithms-py.git
synced 2025-04-29 20:26:07 -04:00
Update bt_height.py
This commit is contained in:
parent
ffe28f3d8e
commit
faeb83a072
@ -5,7 +5,7 @@
|
|||||||
|
|
||||||
def height(root):
|
def height(root):
|
||||||
|
|
||||||
if not root:
|
if root is None:
|
||||||
return 0
|
return 0
|
||||||
|
|
||||||
return 1 + max(height(root.left), height(root.right))
|
return 1 + max(height(root.left), height(root.right))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user