I need an algorithm to build or rebuild pallets. It's pretty straight forward. 200 boxes per pallet, all boxes the same size. So, all I have to worry about is building as few pallets as possible.
Product #1, 100
Product #2, 73
Product #3, 48
They don't want products put on different pallets, so the 48 can't be split into 27 on one pallet and 21 on another. I was going to just sort by qty and keep adding until I can't add anything else to the pallet (in this case, pallet #1 would have 173 and #2 would have 48). This is an easy algorithm, but that won't build the most efficient pallets.