comefrom: <garvit244>322_1.py
code: def coinChange( coins, amount):
      if not coins:
          return 0
      
      dp = [float('inf') for _ in range(amount+1)]
      dp[0] = 0
      
      for val in range(1, amount+1):
          for coin in coins:
              if coin <= val:
                  dp[val] = min(dp[val-coin]+1, dp[val])
      return dp[amount] if dp[amount] != float('inf') else -1
masked: def sample_funcname ( var_0 , var_1 ) :
      if not var_0 :
          return 0
      var_8 = [ float ( 'inf' ) for var_5 in range ( var_1 + 1 ) ]
      var_8 [ 0 ] = 0
      for var_9 in range ( 1 , var_1 + 1 ) :
          for var_10 in var_0 :
              if var_10 <= var_9 :
                  var_8 [ var_9 ] = min ( var_8 [ var_9 - var_10 ] + 1 , var_8 [ var_9 ] )
      return var_8 [ var_1 ] if var_8 [ var_1 ] != float ( 'inf' ) else - 1
  