Driver code
public static void main ( String [ ] args ) { int [ ] arr = { 43 , 1 , 17 , 26 , 15 } ; int k = 16 ; for ( int i = 0 ; i < 1001 ; i ++ ) for ( int j = 0 ; j < 1001 ; j ++ ) dp [ i ] [ j ] = - 1 ; System . out . print ( find_max ( 0 , 0 , arr , k ) ) ; } }