Tagged articles

Bitwise XOR

1 articles · Page 1 of 1
samdeepthink
samdeepthink
Aug 6, 2026 · Interview Experience

Interview Question: Find the Single Occurring Number in an Array – Three Solutions

The article presents a classic interview problem of locating the unique element in an integer array where every other value appears twice, and walks through three Java 17 implementations—brute‑force double loop, HashMap counting, and a bitwise XOR trick—detailing their time and space trade‑offs and practical considerations.

AlgorithmArrayBitwise XOR
0 likes · 8 min read
Interview Question: Find the Single Occurring Number in an Array – Three Solutions