mirror of
https://github.com/TheAlgorithms/Java.git
synced 2025-12-19 07:00:35 +08:00
Add Partition Problem (#4182)
This commit is contained in:
@@ -22,7 +22,7 @@ public class SubsetSum {
|
||||
* @param sum target sum of subset.
|
||||
* @return {@code true} if subset exists, otherwise {@code false}.
|
||||
*/
|
||||
private static boolean subsetSum(int[] arr, int sum) {
|
||||
public static boolean subsetSum(int[] arr, int sum) {
|
||||
int n = arr.length;
|
||||
boolean[][] isSum = new boolean[n + 2][sum + 1];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user