Skip to content

Commit d6cf7fd

Browse files
committed
Python soln for Subtree of another tree correct file
1 parent 1ed5792 commit d6cf7fd

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

DSA 450 GFG/subtree_of_another_tree.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
12
# https://leetcode.com/problems/subtree-of-another-tree/submissions/
23

34
# Definition for a binary tree node.
@@ -28,4 +29,5 @@ def isSubtree(self, root, subRoot):
2829
elif(self.sameTree(root , subRoot)):
2930
return True
3031
else:
31-
return self.isSubtree(root.right , subRoot) or self.isSubtree(root.left , subRoot)
32+
return self.isSubtree(root.right , subRoot) or self.isSubtree(root.left , subRoot)
33+

0 commit comments

Comments
 (0)