1 In The Example Given For The Knapsack Problem The Items Are Sorted By Size Does Th 2538354

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?