You are viewing a single comment's thread. Return to all comments →
if your sum == 0 then you have already found a 'valid' variation of coins in the previous level of the recursion.
And if N = 0, the output should be 1 (zero from every coin type is the 1 and only good solution here)
The Coin Change Problem
You are viewing a single comment's thread. Return to all comments →
if your sum == 0 then you have already found a 'valid' variation of coins in the previous level of the recursion.
And if N = 0, the output should be 1 (zero from every coin type is the 1 and only good solution here)