Get the latest tech news

Algorithmic fitting of Japanese candy


Introduction to bin packing through a simple example of fitting boxes of candy inside a parcel.

npermutations16286432488324107495424At a million tests per second, 4 boxes would already take over a minute in the worst case, although you can abort as soon as you find a fit. It would make sense to try some common arrangements first, and to not venture down recursive branches where the previous box combination is already known not to fit. I am likely to use an existing solution if I adopt this way to find optimal candy sequences, since at this point my JavaScript code is just too slow.

Get the Android app

Or read this on Hacker News

Read more on:

Photo of Japanese

Japanese

Photo of Algorithmic Fitting

Algorithmic Fitting

Photo of Japanese Candy

Japanese Candy

Related news:

News photo

Japanese researchers testing particle accelerator for chipmaking — researchers claim EUV-like lithography capabilities

News photo

Majority of Japanese support government-run dating apps

News photo

Japanese words and names sound African (2022)