Skip to content

Instantly share code, notes, and snippets.

def make_change(coins, target):
min_coins = [0 for i in range(0, target + 1)]
sets = {i:[] for i in range(target + 1)}
for i in range(1, target + 1):
smallest = float("inf")
for coin in coins:
if (coin <= i):
smallest = min(smallest, min_coins[i - coin])
if smallest == min_coins[i - coin]:

Keybase proof

I hereby claim:

  • I am shage001 on github.
  • I am samhage (https://keybase.io/samhage) on keybase.
  • I have a public key ASAGHXZwb2l8p3v0RTymFw9V6aNlYOV4BXZ9oezS3sZYdQo

To claim this, I am signing this object:

@shage001
shage001 / checkout-errors.txt
Last active August 31, 2016 16:03
Checkout errors that we're tracking
40001 = "Invalid email format"
40002 = "Existing user"
40003 = "Existing FB user"
40004 = "Missing password"
40005 = "Existing payment method"
40006 = "Invalid payment method token"
40007 = "Invalid market" (fatal)
40008 = "Invalid event id" (fatal)
40009 = "Invalid quantity" (fatal)
40010 = "Payment method rejected by gateway"
{
"AvailableBlocks": [
7,
5,
4,
3,
2,
1
],
"DisplayNotes": "",