This file contains 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
def ways_to_break(amount, coins): | |
""" | |
:param amount: the monetary value to break into some number of coins | |
:param coins: a container of descending coin denominations | |
:return: the number of different ways to break amount into coins | |
""" | |
this_coin = coins[0] | |
# If this is the only coin, there's one way to break it. | |
if len(coins) == 1: |
This file contains 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
Verifying I am +dblume on my passcard. https://onename.com/dblume |
NewerOlder