Needed more usage of this solution
If I have a list of items with different weights, and each bag can have maximum weight (let say 10), I need another code based on this code in order to find the minumum number of bags needed to fill all items.
Since I'm not a very proffesional of writting C, I appriciate a code.
My approch of solving the problem is :
Each time I find a combination fits in a bag, find all combination from the rest of items not chosen in that combination, recursively.
When there is no more items in list, save this is a set of combination.
After finding all sets, I need to find the minumum set.