23. Coin Change
Given coin denominations and an amount, return the minimum number of coins needed, or -1 if the amount cannot be formed.
उदाहरण 1:
इनपुट: coins = [1,2,5], amount = 11 आउटपुट: 3
उदाहरण 2:
इनपुट: coins = [2], amount = 3 आउटपुट: -1
सीमाएँ:
1 <= coins.length <= 120 <= amount <= 10^4