mirror of
https://github.com/autistic-symposium/master-algorithms-py.git
synced 2025-06-16 02:49:13 -04:00
Update bt_height.py
This commit is contained in:
parent
ffe28f3d8e
commit
faeb83a072
1 changed files with 1 additions and 1 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue