Skip to content

Commit 6fdd9c9

Browse files
Update DynamicProgramming/MinimumSumPartition.java
Co-authored-by: Du Yuanchao <[email protected]>
1 parent e27175b commit 6fdd9c9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

DynamicProgramming/MinimumSumPartition.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ public static int subSet(int[] arr) {
2424
int n = arr.length;
2525
int sum = getSum(arr);
2626
boolean[][] dp = new boolean[n + 1][sum + 1];
27-
for(int i = 0; i < n; i++){
27+
for (int i = 0; i <= n; i++) {
2828
dp[i][0] = true;
2929
}
3030
for(int j = 0; j < sum; j++){

0 commit comments

Comments
 (0)