stchief
BAN USER
Comments (4)
Reputation 0
Page:
1
Comment hidden because of low score. Click to expand.
Comment hidden because of low score. Click to expand.
Comment hidden because of low score. Click to expand.
0
of 0 vote
f(n) = 0 when n < 0
f(0) = 1 to ease the computation
f(n) = f(n-1) + f(n-5) + f(n-10) + f(n-25) - f(n - 1 -5) - f(n -1 - 10) + f(n -1 -5-10) - f(n-1-25) - f(n-5-25) - f(n-25-10) + f(n-25-5-1) + f(n-25-5-10) + f(n -25-1-5-10)
f(n-c) : the number of combinations including at least one coin c
f(n-c1-c2): the intersection of f(n-c1) and f(n-c2), the number of combinations including at least one coin c1 and one coin c2,
Comment hidden because of low score. Click to expand.
Page:
1
CareerCup is the world's biggest and best source for software engineering interview preparation. See all our resources.
count(10) != count(5) +1. The method f(n) = f(coin) + f(n -coin) does not stand
- stchief December 15, 2013