Generally we are only asked the maximum / minimum value that can be obtained in a knapsack type problem. What if you are also asked to print the exact products to choose to obtain the max/min value?
Generally we are only asked the maximum / minimum value that can be obtained in a knapsack type problem. What if you are also asked to print the exact products to choose to obtain the max/min value?