複選題
15. Consider the problem of making change for n cents using the fewest number of coins. An algorithm to solve this problem
is to give the coin with the highest available denomination without going over, and repeat the process until the amount of
remaining change drops to O. Which of the following sets of available coin denominations would cause this algorithm to
fail at yielding an optimal solution?
(A) {1,3}
(B) {1,3,4,5}
(C) {1,5,10, 25}
(D) {c0,c1,..,..ck) for any set of integers c > 1 and k ≥1
答案:登入後查看
統計: 尚無統計資料
統計: 尚無統計資料