Mental Model
Use XOR to cancel out pairs and isolate two unique numbers by splitting based on a differing bit.
Analogy: Imagine you have a box of socks where every sock has a matching pair except two unique socks. By shaking the box and separating socks by a small difference, you can find those two unique socks without checking each one twice.
Array: [2, 3, 7, 9, 2, 3] XOR all: 14 (binary 1110) Find rightmost set bit in 14: 2 (binary 0010) Split array by this bit: Group 1 (bit set): 3, 7, 9, 3 -> XOR = 7 Group 2 (bit not set): 2, 2 -> XOR = 9 XOR each group separately to find unique elements.
