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 single 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]
XOR process: 0 ⊕ 2 -> 2
2 ⊕ 3 -> 1
1 ⊕ 2 -> 3
3 ⊕ 4 -> 7
7 ⊕ 3 -> 4
Result: 4 (only non-repeating)