Make change for cents using coins (, , ). Minimize the number of coins. Greedy approach: take first ( left), then take , take . Total: coins. But wait: + = using only coins! Greedy gave the wrong answer.
What went wrong? The coin values are not "canonical." Taking the locally best coin () blocked the globally best solution ( + ). That's exactly when you need DP instead. The cent coin breaks the canonical property. Taking it first blocks the globally optimal pair. This is why you need to verify greedy choice property before coding.