Mental Model
Use XOR to cancel out pairs and isolate two unique numbers by splitting based on a differing bit.
Analogy: Imagine you have pairs of socks mixed in a pile 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 can separate the pile into two groups and find each unique sock.
Array: [2, 3, 7, 9, 2, 3] Unique elements: 7 and 9 XOR all: 2⊕3⊕7⊕9⊕2⊕3 = 7⊕9 Find rightmost set bit in XOR result to split array into two groups Group 1 -> elements with that bit set Group 2 -> elements without that bit set