This is a bit of an off the wall question, but I am trying to get my head round how exactly (if at all) it is possible to code it
Scenario
I have random data of values of 1,2,3,4 etc
I have "boxes" of 64 that they must fit into
Current Situation
Currently I just loop through each value, add it to 64. When the next value would exceed 64 i move onto the next box.
Is there away to achieve the closest match. Ie for Powershell to reorder the data so that each box is as close to 64 as it can be?
I appreciate this is not a straight forward coding question, but I am not even sure it's possible
Any help received, would be greatly appreciated.
Thanks