3 ms·
This is true. However, both approaches are "dp" if we are talking about the equivalent solution implemented in these different ways.
by baobabKoodaa 8y ago
This is true. However, both approaches are "dp" if we are talking about the equivalent solution implemented in these different ways.
- reader5000 8y agoYeah I thought the recursion+memo wasn't actually "dp" until I looked it up. Recursion without the memo is not DP however since you hit exp running time/memory and the whole point of DP is to avoid this.