Skip to content

Commit 118ea31

Browse files
authored
Improved task 416
1 parent e6daee8 commit 118ea31

File tree

1 file changed

+0
-3
lines changed
  • src/main/java/g0401_0500/s0416_partition_equal_subset_sum

1 file changed

+0
-3
lines changed

src/main/java/g0401_0500/s0416_partition_equal_subset_sum/Solution.java

-3
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,6 @@ public boolean canPartition(int[] nums) {
1717
int[] arr = new int[sum + 2];
1818
int top = 0;
1919
for (int val : nums) {
20-
if (val == sum) {
21-
return true;
22-
}
2320
for (int i = top; i > -1; i--) {
2421
int tempSum = val + arr[i];
2522
if (tempSum <= sum && !set[tempSum]) {

0 commit comments

Comments
 (0)