Driver Code
public static void main ( String [ ] args ) { List < Integer > data = Arrays . asList ( 3 , 1 , 7 , 1 , 2 ) ; int target = 11 ; int val = smallSumSubset ( data , target , data . size ( ) + 1 ) ; if ( val > data . size ( ) ) System . out . println ( - 1 ) ; else System . out . println ( val ) ; } }