Fewest coins for an amount
You have an unlimited supply of coins of each value in coins. Return the smallest number of coins that add up to exactly amount, or -1 if no combination does.
Coin values are positive integers, possibly unsorted or repeated; amount is at least 0, and an amount of 0 needs no coins.
Besides the tests, one large input (an amount of 32) with a ~200 ms limit (scaled to your device's speed): brute force won't pass.
Examples
fewest_coins([1,4,6], 8)→2fewest_coins([2,5], 11)→4fewest_coins([3], 7)→-1