Skip to content

Commit 4d8b09d

Browse files
authored
Update Invert Binary Tree - Leetcode 226.py
1 parent d2a8877 commit 4d8b09d

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

Invert Binary Tree - Leetcode 226.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,6 @@ def invertTree(self, root: Optional[TreeNode]) -> Optional[TreeNode]:
1010
self.invertTree(root.right)
1111

1212
return root
13+
14+
# Time Complexity: O(n)
15+
# Space Complexity: O(h) { here "h" is the height of the tree }

0 commit comments

Comments
 (0)