Learn about the coin change problem using dynamic programming and its code in C, Java and Python. A classic example of an optimization problem involves making change using the fewest coins. Suppose you are a programmer for a vending machine. Coin Change. Medium. Add to List Return the fewest number of coins that you need to make up that amount. If that amount of money cannot be.