input: Write a function to find the minimum number of coins needed to make a given amount.
  assert minCoins(8) == 3
  assert minCoins(11) == 3
  assert minCoins(0) == 0
  assert minCoins(3) == 2
output: def minCoins(amount):
      coins = [1, 3, 5]  # Example denominations
      dp = [float('inf')] * (amount + 1)
      dp[0] = 0
      
      for i in range(1, amount + 1):
          for coin in coins:
              if i - coin >= 0:
                  dp[i] = min(dp[i], dp[i - coin] + 1)
      
      return dp[amount] if dp[amount] != float('inf') else -1