Panda Guru LogoPanda
Guru

Microsoft

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:

Constraints:

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.