EasyBit Manipulation· 77% acceptance
#967

Single Number 32

Easy

Every element appears twice except one. Find that single one using O(n) time and O(1) space. Variant **#32**.

Example 1

Input: nums = [2,2,3,4,4,5,5,4]

Output: 7

Constraints

  • 1 <= nums.length <= 3 * 10^4

Acceptance: 77% · Topics: bit-manipulation, array

singleNumber

← All practice problems