mirror of
https://github.com/autistic-symposium/master-algorithms-py.git
synced 2025-05-02 14:56:27 -04:00
Update bt_find_max_depth.py
This commit is contained in:
parent
a0b0090f8a
commit
e7284b27e2
1 changed files with 1 additions and 0 deletions
|
@ -8,3 +8,4 @@ def max_depth(root: Optional[Node]) -> int:
|
|||
return 0
|
||||
|
||||
return max(max_depth(root.left) + 1, max_depth(root.right) + 1)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue