Driver code
coin = [ 8 , 5 , 3 , 10 , 2 , 1 , 15 , 25 ] NEW_LINE n = len ( coin ) NEW_LINE preprocess ( coin , n ) NEW_LINE k = 3 NEW_LINE print ( minCost ( coin , n , k ) ) NEW_LINE k = 7 NEW_LINE print ( minCost ( coin , n , k ) ) NEW_LINE