Coin Change
Medium๐ท๏ธ Dynamic programming๐ Greedy & Dynamic Programming
๐งฉ The problem
Return the fewest coins needed to make amount, or -1 if impossible. You have unlimited coins of each value.
Examples
[1, 2, 5], 11 โ 3 (5 + 5 + 1)
๐ฏ Aim for: O(amount ร coins)
โ๏ธ Write your solution
Pick a language, press Run to try it, then Run tests to check it against every test case โ just like a coding interview.