We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
I don't understand why if sum == 0 then return 1;
If sum is 0 and the coin values are >= 1, how can I have one solution if the sum is 0? if sum is 0 I should have 0 solutions...
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
The Coin Change Problem
You are viewing a single comment's thread. Return to all comments →
I don't understand why if sum == 0 then return 1; If sum is 0 and the coin values are >= 1, how can I have one solution if the sum is 0? if sum is 0 I should have 0 solutions...