package leetcode;

/**
 * https://leetcode.com/problems/partition-to-k-equal-sum-subsets/
 */
public class Problem698 {
    public boolean canPartitionKSubsets(int[] nums, int k) {
        // TODO
        return false;
    }

    public static void main(String[] args) {
        Problem698 prob = new Problem698();
        System.out.println(prob.canPartitionKSubsets(new int[]{4, 3, 2, 3, 5, 2, 1}, 4)); // true
    }
}

@@ -219,16 +219,353 @@
 %0A    %7D%0A%0A
+    private static boolean canPartition(int%5B%5D nums, int k, int idx) %7B%0A        if (k == 0 && idx == nums.length) %7B%0A            return true;%0A        %7D%0A        if (k == 0 && idx %3C nums.length) %7B%0A            return false;%0A        %7D%0A        for (int i = idx; i %3C nums.length; i++) %7B%0A            // TODO%0A        %7D%0A        return false;%0A    %7D%0A%0A
     publ
@@ -743,16 +743,113 @@
 // true%0A
+        System.out.println(prob.canPartitionKSubsets(new int%5B%5D%7B5, 3, 2, 3, 4, 2, 1%7D,4)); // true%0A
     %7D%0A%7D%0A

Update problem 698