Skip to content

Commit 7267e82

Browse files
authored
Update Subtree of Another Tree - Leetcode 572.py
1 parent ef3c5bf commit 7267e82

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

Subtree of Another Tree - Leetcode 572.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,3 +23,6 @@ def has_subtree(root):
2323
return has_subtree(root.left) or has_subtree(root.right)
2424

2525
return has_subtree(root)
26+
27+
# Time Complexity: O(m * n)
28+
# Space Complexity: O(n)

0 commit comments

Comments
 (0)