This question is specifically addressed towards the coin change problem. I know the algorithm to find the optimal number of coins used to find change for any amount, and I also understand it but what I don't understand is how could I "mark" if you will the path taken to find such solution. I have tried to use parent pointers, which I'm sure is the way to do it, but I simply don't know how I would implement it. Here's an example. Example: given coin denominations: 1, 10, 25 Change: 30 Optimum solution requires: 3 coins Coins used: 10, 10, 10
I am not really that good at solving dynamic programming problems.