Driver Code
int main ( ) { vector < int > data = { 3 , 1 , 7 , 1 , 2 } ; int target = 11 ; int val = smallSumSubset ( data , target , data . size ( ) + 1 ) ; if ( val > data . size ( ) ) cout << -1 ; else cout << val ; }