“You wouldn’t pour three separate concrete foundations if you have three steps that need a foundation. You’d do it once so that it’s ready for anything that needs it.”

The “programming” in dynamic programming means planning or scheduling, not writing code. Richard Bellman chose the name in the 1950s to sell a mathematical optimization technique to a Defense Secretary who hated the word “research.” The construction analogy here makes the concept click better than most CS textbooks manage. Decades of confused undergrads could have been spared if anyone had led with this explanation.