Round 1
Questions: Given a set of N non-negative integers, Mr. Vega wants to choose 2 non-empty non-intersecting subsets. Additionally, Mr. Vega also wants the difference of subset sums to be minimized. Your task is to find the minimum possible difference of subset sums.
Input Format:
- The first line contains an integer, N, denoting the number of elements in A.
- Each line i of the N subsequent lines (where 0 <= i < N) contains an integer describing A[i].
Constraints:
- 2 <= N <= 17
- 1 <= A[i] <= 10^9
Sample Input:
4 39 44 9 57
Sample Output:
4
Explanation: Sum difference between subsets (39, 9) and (44) is 4.
Sample Input:
3 66 31 35
Sample Output:
0
Explanation: Sum difference between subsets (31, 35) and (66) is 0.
Sample Input:
4 97 12 19 90
Sample Output:
0
Explanation: Sum difference between subsets (97, 12) and (90, 19) is 0.
Candidate's Approach
No approach provided.
Interviewer's Feedback
No feedback provided.