amit (via Jason Kottke): Given a pile of n pairs of socks, containing 2n elements (assume each sock has exactly one matching pair), what is the best way to pair them up efficiently with up to logarithmic extra space? I like this answer from Srinivas, although it assumes that each sock has more than one … Continue reading How to Pair Socks Efficiently
Copy and paste this URL into your WordPress site to embed
Copy and paste this code into your site to embed