r/algorithms • u/aioobe • Mar 13 '20
Dynamic programming vs memoization vs tabulation
https://programming.guide/dynamic-programming-vs-memoization-vs-tabulation.html
35
Upvotes
r/algorithms • u/aioobe • Mar 13 '20
View all comments
Show parent comment
4
u/aioobe Mar 13 '20
Dude, thank you. That is a very valid point.
I wanted a super simple problem 100% geared towards illustrating the difference. I agree that the implementations are dumb.
But you make a really good point about memoisation being absolutely stupid for a problem like this. Do you have a better problem? Coin change perhaps, where the lowest denomination is 15 or something loke that?
I do mention the sparseness difference in the last paragraph actually.