K Subsets With Equal Sum
1. You are given an array of n distinct integers. 2. You have to divide these n integers into k non-empty subsets such that sum of integers of every subset is same. 3. If it is not possible to divide, then print "-1". Note -> Check out the question video and write the recursive code as it is intended without changing signature. The judge can't force you but intends you to teach a concept.
1 <= n <= 20 1 <= arr[i] <= 100 1 <= k <= n
A number n n distinct integers A number k
Check the sample ouput and question video.
6 1 2 3 4 5 6 3
[1, 6] [2, 5] [3, 4]