It is not specified what should happen if it is not possible to form x using the available coins (e.g x = 5, coins = {2, 4}), or if they would happen at all.
Also:
A vector of integers coins (1 ≤ coins ≤ 100) representing different coin denominations available.
The range of elements of coins should be specified too. What if 0 or negative numbers appear in coins?
There are already several existing katas about this exact type of DP.
It is not specified what should happen if it is not possible to form
x
using the available coins (e.gx = 5, coins = {2, 4}
), or if they would happen at all.Also:
The range of elements of
coins
should be specified too. What if0
or negative numbers appear incoins
?Sample tests doesn't work:
There are no random tests either.