Assign stones of weights 9,1,7,3,6 (in kg) to buckets of weights 7,8,9,10 ( in kg ).

How will you optimally assign the stones to buckets considering minimum number of buckets being used & minimum space being utilized?

Stone weights [ 9 1 7 3 6 ] => 5 stones with weights given
Bucket Weights [7 8 9 10] => 4 buckets with capacity given

Ans is

9 => 9
7,3 => 10
6,1 => 7

Tried a variety of concepts, but none proved beneficial. Seems like a different variety of a problem. Can someone throw light on it :)

Comments (6)