~/boss / the-imposter
The XOR trick
The Imposter
Everyone came in pairs except one. Find the imposter with a single variable.
Loading the fight…
How to beat it
Feed every player into one crystal: crystal XOR player, which flips the crystal's bits wherever the player has a 1. A number XOR itself is 0 and XOR 0 changes nothing, so every pair cancels, however far apart they arrive. When the crowd is gone, the crystal shows the imposter.
Now the real boss
Interviews ask for the code. Watch it run, then write it yourself, tested in Python, C++ or Java.
On your phone? Writing code is easier on a laptop: open bossfight.dev/problems/sock-without-a-match there. Sign in with your email to keep your progress on every device.