Skip to content

Commit c74d710

Browse files
authored
Update Same Binary Tree - Leetcode 100.py
1 parent e838854 commit c74d710

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

Same Binary Tree - Leetcode 100/Same Binary Tree - Leetcode 100.py

+3-2
Original file line numberDiff line numberDiff line change
@@ -21,5 +21,6 @@ def isSameTree(self, p: Optional[TreeNode], q: Optional[TreeNode]) -> bool:
2121
return self.isSameTree(p.left, q.left) and \
2222
self.isSameTree(p.right, q.right)
2323

24-
# Time Complexity: O(n)
25-
# Space Complexity: O(h) { here "h" is the height of the tree }
24+
# Time Complexity: O(n + m)
25+
# Space Complexity: O(n + m)
26+
# m is number of nodes in p, n is number of nodes in Q.

0 commit comments

Comments
 (0)