This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #! /usr/bin/env python | |
| # -*- coding: utf-8 -*- | |
| # T: an array containing the values of the coins | |
| # L: integer wich is the total to give back | |
| # Output: Minimal number of coins needed to make a total of L | |
| def dynamicCoinChange( T, L ): | |
| Opt = [0 for i in range(0, L+1)] | |