An entry is made in the memo whenever an item, memo and an available size pair is considered.
每当选择一件物品和考虑,一种可行的方案时,都会访问。
So I'm not going to take the item with an index of 2.
所以我不会选择,索引值为2的物品。
This is going to be don't take.
这边表示不选择该物品。
So he's packing and unpacking, packing and unpacking, trying all possible combinations of objects that will obey the constraint. And then choosing the winner. Well, this is like an algorithm we've seen before. It's not greedy.
因此它不断装包和清包,尝试了所有满足约束条件的物品组合,最后选择最优者,这很像我们以前看过的一个算法,这不是贪婪算法。
So we'll take another don't-take branch here.
所以我们将会在这里走到,另一个不应该选择的物品。
应用推荐