Separate a list based on sum of value

Happened to have this saved. There are some differences, namely that the example has fixed bins and aimed to have small overflow (versus your bin packing), but it should be a good reference.

1 Like