code: def coin_change_1(coins, amount):
      if amount == 0:
          return 0
      if len(coins) == 0:
          return -1
  
      max_value = amount + 1  # use this instead of math.inf
      dp = [max_value for i in range(max_value)]
      dp[0] = 0
  
      for i in range(1, max_value):
          for c in coins:
              if c <= i:
                  # search on previous positions for min coins needed
                  dp[i] = min(dp[i], dp[i - c] + 1)
  
      if dp[amount] == max_value:
          return -1
      return dp[amount]
  
label_desc: Use image node_id 1 for calling a global function with example usage: coin_change_1(coins, amount) and returns: dp, int, unknown, unknown