Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- int change(int coins[], int n, int sum) {
- if (n==0) return sum==0;
- int count=0;
- for (;sum>=0;sum-=coins[0])
- count+=change(coins+1,n-1,sum);
- return count;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement