Write a Java program to divide a given array of integers into given k non-empty subsets whose sums are all equal. Return true if all sums are equal otherwise return false
Write a Java program to divide a given array of integers into given k non-empty subsets whose sums are all equal. Return true if all sums are equal otherwise return false
Example: nums = {1,3,3,5,6,6}, k = 4; 4 subsets (5,1), (3, 3), (6), (6) with equal sums.
Expected Output:
Original Array: [1, 3, 3, 5, 6, 6]
Target of subsets: 4
After removing duplicate characters: true
Sample Output:
need an explanation for this answer? contact us directly to get an explanation for this answer