SICP 1.2.2 asks for iterative-process impl of change-counting algorithm. + I tried during today—no dice. Ideas?
Conversation
just like Fibonacci seq only depends on last 2 vals, change-counting seq depends on last 25
2
And wait, why’s it only depend on the last 25?
1
ah never mind, I wasn't considering different orders of coins being equivalent…
1
for number of change _sequences_, a_n = a_{n-1} + a_{n-5} + a_{n-10} + a_{n-25}, but this problem isn't so simple :(
1
1
1
… yeah, I don't see a good way aside from memoizing (as the footnote implies)
1
although you only have to memoize O(1) values (specifically 91), which a masochist could place in args???
1
1
2
2
2

