Update DynamicProgramming/MinimumSumPartition.java
Co-authored-by: Du Yuanchao <shellhub.me@gmail.com>
This commit is contained in:
parent
86d6e932ab
commit
3e727e3ff5
@ -81,13 +81,12 @@ public class MinimumSumPartition
|
|||||||
return min;
|
return min;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void main(String args[]){
|
/**
|
||||||
Scanner in = new Scanner(System.in);
|
* Driver Code
|
||||||
int n = in.nextInt();
|
*/
|
||||||
int arr[] = new int[n];
|
public static void main(String[] args) {
|
||||||
for(int i = 0 ; i<n; i++){
|
assert subSet(new int[]{1, 6, 11,5}) == 1;
|
||||||
arr[i] = in.nextInt();
|
assert subSet(new int[]{36, 7, 46, 40}) == 23;
|
||||||
}
|
assert subSet(new int[]{1, 2, 3, 9}) == 3;
|
||||||
System.out.println(subSet(arr));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user