Skip to content

Commit 2445622

Browse files
refactor 572
1 parent cb40ffa commit 2445622

File tree

1 file changed

+0
-38
lines changed
  • src/main/java/com/fishercoder/solutions

1 file changed

+0
-38
lines changed

src/main/java/com/fishercoder/solutions/_572.java

Lines changed: 0 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -2,44 +2,6 @@
22

33
import com.fishercoder.common.classes.TreeNode;
44

5-
/**
6-
* 572. Subtree of Another Tree
7-
*
8-
Given two non-empty binary trees s and t,
9-
check whether tree t has exactly the same structure and node values with a subtree of s.
10-
A subtree of s is a tree consists of a node in s and all of this node's descendants. The tree s could also be considered as a subtree of itself.
11-
12-
Example 1:
13-
Given tree s:
14-
15-
3
16-
/ \
17-
4 5
18-
/ \
19-
1 2
20-
Given tree t:
21-
4
22-
/ \
23-
1 2
24-
Return true, because t has the same structure and node values with a subtree of s.
25-
26-
Example 2:
27-
Given tree s:
28-
29-
3
30-
/ \
31-
4 5
32-
/ \
33-
1 2
34-
/
35-
0
36-
37-
Given tree t:
38-
4
39-
/ \
40-
1 2
41-
Return false.
42-
*/
435
public class _572 {
446

457
public static class Solution1 {

0 commit comments

Comments
 (0)