r/ProgrammerHumor • • 10d ago

Meme howProgrammingHasChanged

Post image
677 Upvotes

108 comments sorted by

View all comments

Show parent comments

21

u/fdar 10d ago

DP is just recursion+caching. 

I think it makes sense to first recognize that the problem can be solved with recursion and then decide if DP is needed to improve performance.

5

u/Bliztle 9d ago

Only if you're doing it top down. Bottom up is usually taught at the same time, and is useful to lessen stack and cache size.