Skip to content

Commit b527c64

Browse files
authored
Update Diameter of Binary Tree - Leetcode 543.py
1 parent 28762b2 commit b527c64

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

Diameter of Binary Tree - Leetcode 543.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,3 +16,6 @@ def height(root):
1616

1717
height(root)
1818
return largest_diameter[0]
19+
20+
# Time Complexity: O(n)
21+
# Space Complexity: O(h) { here "h" is the height of the tree }

0 commit comments

Comments
 (0)