Update bt_find_max_depth.py

This commit is contained in:
marina 2023-08-03 13:16:54 -07:00 committed by GitHub
parent a0b0090f8a
commit e7284b27e2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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)