I wish to know if there are any known algorithms for dispensing a list of files for a specified maximum directory size (disc size for example), while attempting to keep output directories size close to each other.

1 Answer 1


This is the classic bin-packing problem.

It is classic because it can be applied to so many tasks that we'd like to optimize but it is computationally NP-hard.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.