x ^ x = 0 and x ^ 0 = x: XOR a list together and the pairs cancel. The single number among pairs, the missing number in 0..n, two singles split by their lowest differing bit, and a swap without a temporary, against counting with a hash map.
This interactive visualization needs JavaScript.