I am implementing a news feed similar to Google+ .
The problem can be abstracted as follows:
Given a list of blocks (different heights, but the same widths as the width of the column), how can we arrange the texts in three columns to make the total page length shorter?
Note that blocks cannot overlap, and blocks do not follow any order.
source
share