EasyBit Manipulation· 71% acceptance
#961

Single Number 26

Easy

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

Example 1

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

Output: 6

Constraints

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

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

singleNumber

← All practice problems