>_
coin_change.kt
Kotlin 2.4
Not run yet

+ 7 hidden

Input
coins = [1, 5, 6, 9]
amount = 11
Expected
2

5 + 6 pays 11 with two coins. Taking the largest coin first gives 9 + 1 + 1, three coins.