text: Driver Code to test above function
code: static void Main ( ) { int W = 3 , K = 3 , M = 2 ; int [ , ] dp = new int [ W + 1 , 2 ] ; for ( int i = 0 ; i < W + 1 ; i ++ ) for ( int j = 0 ; j < 2 ; j ++ ) dp [ i , j ] = - 1 ; Console . Write ( solve ( dp , W , K , M , 0 ) + " STRNEWLINE " ) ; } }