10. Single Number
EasyBit manipulation
Every element in nums appears twice except one. Return the element that appears once, using constant extra space.
Example 1
Input: nums = [4, 1, 2, 1, 2] Output: 4
Example 2
Input: nums = [2, 2, 1] Output: 1
Constraints
1 ≤ nums.length ≤ 3 × 10⁴nums.length is odd