Page "Optimal substructure" Paragraph 4
from
Wikipedia
Consider finding a shortest path for travelling between two cities by car, as illustrated in Figure 1.
That is, if the shortest route from Seattle to Los Angeles passes through Portland and then Sacramento, then the shortest route from Portland to Los Angeles must pass through Sacramento too.
That is, the problem of how to get from Portland to Los Angeles is nested inside the problem of how to get from Seattle to Los Angeles.
Page 1 of 1.
1.818 seconds.