卷別
資料結構與演算法
選擇國立中興大學 2025 · 考試 · 第 8 題
考科演算法
(3 points) Consider the following array of positive integers representing the value of items: values , and their corresponding weights: weights . You are given a knapsack with a maximum capacity of 9 units. Using dynamic programming, calculate the maximum total value you can achieve by selecting items such that their total weight does not exceed the capacity.
- (A)19
- (B)20
- (C)21
- (D)23