Greedy solution to Coin Change problem

Revision en1, by purist, 2018-07-13 14:59:48

I observed that some of the coin sets for coin change problem(getting minimum number of change coins for given amount) gives same solution with dp solution and greedy solution. I was wondering what is necessary and sufficient condition for getting optimal solution using greedy approach?

Tags #coin-change, coin change, greedy, dynamic programing

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English purist 2018-07-13 14:59:48 325 Initial revision (published)