Given some arbitrary set of coins, e.g. { 25, 10, 5 }, and some target currency like 10.46, determine if it is possible to produce the target amount with the set of coins. Assume you have an infinite set of the provided coins.
Method 1, Brute Force
Check every single possible combination (with duplicates) of coin that can produce it. That is, iterate DFS style, until the final target coin is found.
Consider the example with set coins 25, 30, 35, with a trivial target of 46.
This problem clearly has 'optimal substructure', or in other words, inherits overlapping subproblems with brute force approach. If we map for ourselves what doesnt work, and look it up later, we avoid having to descend down the same path again.
Consider the instance with a set coin amount of {7, 8, 3, 6}, and a target currency of 18 that contains an overlapping subtree of 5.
We two instances of subtree "5", from which could have been avoided using dp.