Skip to content

Single Element ​

Single Element — LeetCode

Every element in the array appears twice except for one. Find that single element in linear time and constant space.

Approach ​

XOR the whole array

Remarks ​