Array Subsets (Frontend)

Array Subsets (Frontend) is an Ibm interviews coding interview problem. Given an integer array, divide it into two disjoint subsets A and B whose union equals the array. Find subset A with minimal size such that sum(A) > sum(B); if several exist, choose the one with the maximal sum. Return A in increasing order. Classic interview question for coding interview practice.

Example

Unlock to view complete problem details

and practice with sample input/output

Was this article helpful?

View Test Cases & Run Code requires membership

Input Variables
Execution Result: