【发布时间】:2015-07-20 02:25:16
【问题描述】:
我很难理解这个问题背后的逻辑, 这是经典的动态规划问题
Coin Change is the problem of finding the number
of ways of making changes for a particular amount of cents, n,
using a given set of denominations d1,d2,..dm;
我知道递归是如何工作的,无论是否拿走第 m 个硬币。但我不明白 '+' 在两种状态之间有什么作用。
例如
C(N,m)=C(N,m-1)+C(N-dm,m)
^
|
问题可能很愚蠢,但我仍然想知道,以便我能更好地理解。谢谢
【问题讨论】: