@wormx yup, the test cases are very weak may be. The solution you are taking about is mine, and it takes the minimum of all the possible subsets. The best way to solve this problem. Best because you are checking every single possibility and then selecting your answer.