CodeOath
← All problems

Single Number

Easy
arraysbit-manipulation

Every element appears twice except one — find it, in O(n) time and O(1) space.

Example:

Input: nums = [4,1,2,1,2]
Output: 4