Skip to content

Commit 9355100

Browse files
authored
Update Same Binary Tree - Leetcode 100.py
1 parent b527c64 commit 9355100

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

Same Binary Tree - Leetcode 100.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,3 +14,6 @@ def balanced(p, q):
1414
return balanced(p.left, q.left) and balanced(p.right, q.right)
1515

1616
return balanced(p, q)
17+
18+
# Time Complexity: O(n)
19+
# Space Complexity: O(h) { here "h" is the height of the tree }

0 commit comments

Comments
 (0)