一、原题
Given an array of integers, every element appears twice except for one. Find that single one.
给出一个整数数组,数组中只有一个元素出现一次,找出这个仅出现一次的数字
Note:
Your algorithm should have a linear runtime complexity. Could you implement it without using extra memory?
要求线性时间复杂度,不占用额外的空间
二、解题思想
三、代码如下:
题目原地址,请查看
点击打开链接