mirror of
https://github.com/autistic-symposium/master-algorithms-py.git
synced 2025-04-30 04:36:08 -04:00
Update bt_find_max_depth.py
This commit is contained in:
parent
a0b0090f8a
commit
e7284b27e2
@ -8,3 +8,4 @@ def max_depth(root: Optional[Node]) -> int:
|
|||||||
return 0
|
return 0
|
||||||
|
|
||||||
return max(max_depth(root.left) + 1, max_depth(root.right) + 1)
|
return max(max_depth(root.left) + 1, max_depth(root.right) + 1)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user