Update DynamicProgramming/MinimumSumPartition.java

Co-authored-by: Du Yuanchao <shellhub.me@gmail.com>
This commit is contained in:
tribbleofjim 2020-09-06 16:54:10 +08:00 committed by GitHub
parent 86d6e932ab
commit 3e727e3ff5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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));
} }
} }