Mental Model
Use XOR to cancel out pairs and find two unique numbers by splitting based on a differing bit.
Analogy: Imagine you have pairs of socks mixed in a drawer except two socks that don't have a pair. By looking at a specific color stripe that only one of the unique socks has, you separate the socks into two piles and find each unique sock easily.
Array: [2, 3, 7, 9, 2, 3] Pairs cancel out -> only 7 and 9 remain unique XOR all: 2⊕3⊕7⊕9⊕2⊕3 = 7⊕9 Split by rightmost set bit of XOR result: Group 1 (bit set): 7 -> [7] Group 2 (bit not set): 9 -> [9]
