We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4d8b09d commit 5619146Copy full SHA for 5619146
Maximum Depth of Binary Tree - Leetcode 104.py
@@ -7,3 +7,6 @@ def maxDepth(self, root: Optional[TreeNode]) -> int:
7
right = self.maxDepth(root.right)
8
9
return 1 + max(left, right)
10
+
11
+# Time Complexity: O(n)
12
+# Space Complexity: O(h) { here "h" is the height of the binary tree }
0 commit comments