Q:

(Optimal bin packing) Rewrite the preceding program so that it finds an optimal solution that packs all objects using the smallest number of containers. Here is a sample run of the program:

0

(Optimal bin packing) Rewrite the preceding program so that it finds an optimal solution that packs all objects using the smallest number of containers. Here is a sample run of the program:

Enter the number of objects: 6

Enter the weights of the objects: 7 5 2 3 5 8

Container 1 contains objects with weight 7 3

Container 2 contains objects with weight 5 5

Container 3 contains objects with weight 2 8

The optimal number of bins is 3

What is the time complexity of your program? 

All Answers

total answers (0)

Similar questions


need a help?


find thousands of online teachers now