SOJ Algorithm 6.3: The Sock Sorting Conundrum
Sort Order:
Our patented, highly-redundant algorithm will sort your socks in the following order:
- Matching pairs: 1, 3, 5, ...
- Single socks: 2, 4, 6, ... (with a dash of existential dread)
- Unmatched socks: 7, 9, 11, ... (and a pinch of hope)
View implementation details for SOJ Algorithm 6.3