Interesting Coin DP Question

Revision en1, by expertcoderhk, 2023-10-23 17:44:51

Given a List of coins, find minimum number of coins that need to be added to list so that all prices from [1,P] can be paid using the coins of list.

Constraints Length of coin list<=100000 Value of coins <=1000 P<=10000

Sample: P=19 Coinlist={1,4,10} solution=2

Tags dp, knapsack, 0/1 knapsack, coin change

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English expertcoderhk 2023-10-23 17:44:51 311 Initial revision (published)