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 95c307f commit 31e7631Copy full SHA for 31e7631
leetcode/easy/543_diameter_of_binary_tree.md
@@ -2,8 +2,9 @@
2
3
## Best Solution
4
- Runtime: O(N)
5
-- Space: O(N)
+- Space: O(H)
6
- N = Number of nodes in binary tree
7
+- H = Height of the tree
8
9
Take this binary tree example:
10
```
0 commit comments