medium10 pts · first answer countsdynamic-programmingcoin-changecounting
Loop order in coin counting
In the coin-counting DP, ways[a] += ways[a - c]. What changes when you put the amount loop outside and the coin loop inside?
Discussion 0
Join free to post in the discussion.
Related questions
- Signs that a problem suits DPBackend Developer
- What memoisation meansBackend Developer
- What tabulation meansBackend Developer
- Cost of plain recursive FibonacciBackend Developer
- Fibonacci after adding a cacheBackend Developer
- Recursion with no base caseBackend Developer
- Ways to climb five stairsBackend Developer
- Hidden memory cost of recursionBackend Developer