Hacker News new | ask | show | jobs
by fangel 4699 days ago
I too made something similar recently. I decided to use dynamic programming. This way it's easy to ensure that you don't end up with a half row at the end. It also doesn't require changes to the ordering of the images. http://fangel.github.io/packing-images-in-a-grid/