Mental Model
XORing a number with itself cancels out to zero, so XORing all numbers leaves only the one that appears once.
Analogy: Imagine you have pairs of socks in a drawer, and one sock without a pair. If you match and remove pairs, the leftover sock is the one without a pair.
Array: [2] -> [3] -> [2] -> [4] -> [3] -> null XOR process: 0 ⊕ 2 ⊕ 3 ⊕ 2 ⊕ 4 ⊕ 3 = 4 (leftover)
