Single Number (Bit Manipulation)

Easy

📝 Description

Find the single number in array where others appear twice (use XOR)

Input Format

[a1, a2, ..., an]

Output Format

integer

Constraints

1 ≤ n ≤ 3×10^4, n is odd

🔍 Sample Input

[4,1,2,1,2]
            

✅ Sample Output

4
            

Code Editor

Please login to run and submit code.

Shortcuts: Ctrl+Enter to submit, Ctrl+Shift+R to run