複選題

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

答案:登入後查看
統計: 尚無統計資料

詳解 (共 1 筆)

#7105821
好的,下面是針對這道考試題目的詳細解答說...
(共 1115 字,隱藏中)
前往觀看
0
0