A really helpful analogy: dynamic programming is bottom-up memoisation: https://stackoverflow.com/a/6185005