HNHacker News
TopNewBestAskShowJobs

gauravsc

258 karma · joined April 24, 2012

NLP PhD University College London
submissionscomments
gauravsc··on JQuery plugin to arrange images using knapsack algorithm
We have used Knapsack 0-1 algorithm, since in our case images had different widths but the same height, we wanted to fit in as many images as possible so that they fit in the best way possible. We gave value 1 to each image and weight equal to width and use the total width of container of images as the maximum weight allowed.
← PreviousPage 2 of 2