I have two instances where I'd like to display information in a "justified" alignment - but I don't care if the values are switched in order. One example being displaying the usernames of people online:
Anton Brother68 Commissar Dougheater Elflord Foobar Goop Hoo Iee Joo
Rearranging them we could get exactly 22 characters long on each line:
Anton Brother68 Foobar
Commissar Elflord Goop
Dougheater Hoo Iee Joo
This is kind of a knapsack, except seems like there ought to be a P solution since I don't care about perfection, and I have multiple lines.
Second instance is identical, except instead of names and character count I would be displaying random images and use their width.