logoalt Hacker News

vanviegenyesterday at 10:22 AM4 repliesview on HN

Are you sure that's a good strategy if every unique index value requires you to buy a physical container?


Replies

Dylan16807yesterday at 10:58 AM

You can put a few shapes into one container and it's still much faster than searching color-first.

fxtentacleyesterday at 11:33 AM

How about arithmetic coding? That will give you the highest amount of entropy reduction for any possible number of containers. Which probably means that you’ll sort similar pieces far apart but group by colors that are easy to separate, like red+yellow, brown+green

vidarhyesterday at 10:57 AM

Radix sort. Decide how many containers you're fine with, and group accordingly.