Required condition
else if ( data [ 0 ] >= target ) return 1 ; else if ( data [ 0 ] < target ) { List < int > temp = new List < int > ( ) ; for ( int i = 1 ; i < data . Count ; i ++ ) temp . Add ( data [ i ] ) ; return Math . Min ( smallSumSubset ( temp , target , maxVal ) , 1 + smallSumSubset ( temp , target - data [ 0 ] , maxVal ) ) ; } return 0 ; }