Driver code
static void Main ( ) { List < int > data = new List < int > ( ) ; data . Add ( 3 ) ; data . Add ( 1 ) ; data . Add ( 7 ) ; data . Add ( 1 ) ; data . Add ( 2 ) ; int target = 11 ; int val = smallSumSubset ( data , target , data . Count + 1 ) ; if ( val > data . Count ) Console . Write ( - 1 ) ; else Console . Write ( val ) ; } }