http://stackoverflow.com/questions/14415881/how-to-pair-socks-from-a-pile-efficiently