“It’s the kind of thing a programmer might have to write a script for in real life, and it shows whether they understand file I/O, hash tables (maps), and how to use their language’s sort function.”
The fastest version was C with a hand-rolled hash table. The biggest surprise was a shell pipeline that got five times faster by setting the sort locale to C. The language matters less than reading the profiler. Most slow code is slow because nobody looked.