Dynamic programming keeps the answer to a smaller question so later choices can reuse it. Start by writing what one state means. A count of routes, a minimum cost, and a yes-or-no reachability flag need different base values even if their loops look similar. Zero is a valid cost, but it isn't a valid count for an empty route that must seed later routes.
Work from dependencies to iteration order. Reusable tokens can extend a smaller total repeatedly. An indivisible crate can't: updating subset sums downward prevents using that crate twice. For a strictly increasing subsequence, a compact set of best tails replaces a quadratic state table.
Before coding, trace the smallest nonempty input and the empty input. After coding, explain why every transition represents a legal choice and why no choice is lost. The final exercise applies the state idea to a load split rather than a path count.