What would the knapsack program do if one of the values


Problem

1. In the example given for the knapsack problem, the items are sorted by size. Does the algorithm still work properly if they appear in arbitrary order?

2. Modify the knapsack program to take into account another constraint defined by an array that contains the number of available items of each type.

3. What would the knapsack program do if one of the values were negative?

Request for Solution File

Ask an Expert for Answer!!
Computer Engineering: What would the knapsack program do if one of the values
Reference No:- TGS02652522

Expected delivery within 24 Hours