For the minimum coin change recurrence, initialize and usewhere the minimum over no feasible predecessor is and . Removing the last coin of an optimal representation proves the lower bound; appending the corresponding coin to an optimal predecessor proves attainability. is the minimum number of coins, obtained in time and space. Store one minimizing coin per amount if the actual coins are wanted.
Articles by others on the same topic
There are currently no matching articles.