File tree Expand file tree Collapse file tree 1 file changed +0
-28
lines changed
src/main/java/com/fishercoder/solutions Expand file tree Collapse file tree 1 file changed +0
-28
lines changed Original file line number Diff line number Diff line change 2
2
3
3
import java .util .Arrays ;
4
4
5
- /**
6
- * 416. Partition Equal Subset Sum
7
- *
8
- * Given a non-empty array containing only positive integers,
9
- * find if the array can be partitioned into two subsets such that the sum of elements in both subsets is equal.
10
-
11
- Note:
12
-
13
- Each of the array element will not exceed 100.
14
- The array size will not exceed 200.
15
-
16
- Example 1:
17
-
18
- Input: [1, 5, 11, 5]
19
-
20
- Output: true
21
-
22
- Explanation: The array can be partitioned as [1, 5, 5] and [11].
23
-
24
-
25
- Example 2:
26
-
27
- Input: [1, 2, 3, 5]
28
-
29
- Output: false
30
-
31
- Explanation: The array cannot be partitioned into equal sum subsets.
32
- */
33
5
public class _416 {
34
6
public static class Solution1 {
35
7
/**
You can’t perform that action at this time.
0 commit comments