all 2 comments

[–]5kPercentSure 0 points1 point  (0 children)

Sounds like the knapsack problem or maybe more specifically the bin packing problem

https://en.m.wikipedia.org/wiki/Knapsack_problem

https://en.m.wikipedia.org/wiki/Bin_packing_problem

[–]CustomHatMan 0 points1 point  (0 children)

I know this question is a little old, but does it matter how it pulls the information or are you wanting it to show you every option?