This question already has answers here: 开发者_开发技巧 How to find which elements are in the bag, using Knapsack Algorithm [and not only the bag's value]?
This is a follow up question from Grammar: difference between a top down and bottom up? I understand from that question that: