Pairing socks algorithm | Hacker News Reader