Skip to content

Commit a4ee3d4

Browse files
refactor 663
1 parent 8259293 commit a4ee3d4

File tree

1 file changed

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

1 file changed

+0
-46
lines changed

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

Lines changed: 0 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -5,52 +5,6 @@
55
import java.util.HashMap;
66
import java.util.Map;
77

8-
/**
9-
* 663. Equal Tree Partition
10-
*
11-
* Given a binary tree with n nodes,
12-
* your task is to check if it's possible to partition the tree to two trees which have the equal sum of values
13-
* after removing exactly one edge on the original tree.
14-
15-
Example 1:
16-
Input:
17-
5
18-
/ \
19-
10 10
20-
/ \
21-
2 3
22-
23-
Output: True
24-
Explanation:
25-
5
26-
/
27-
10
28-
29-
Sum: 15
30-
31-
10
32-
/ \
33-
2 3
34-
35-
Sum: 15
36-
37-
38-
Example 2:
39-
Input:
40-
1
41-
/ \
42-
2 10
43-
/ \
44-
2 20
45-
46-
Output: False
47-
Explanation: You can't split the tree into two trees with equal sum after removing exactly one edge on the tree.
48-
49-
Note:
50-
The range of tree node value is in the range of [-100000, 100000].
51-
1 <= n <= 10000
52-
53-
*/
548
public class _663 {
559
public static class Solution1 {
5610
/**

0 commit comments

Comments
 (0)