只出现一次的数字

LeetCode 经典 150 位运算
难度: 简单

题目描述

找到数组中只出现一次的数字,其他数字均出现两次。

解题思路

使用异或操作,重复数字会抵消,最终结果为只出现一次的数字。