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