# 136. Single Number

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?

class Solution {
public:
int singleNumber(vector<int>& nums) {
int sum=0;
for(int i=0;i<nums.size();i++)
{
sum = sum ^ nums[i];

}
return sum;

}
};

#### LeetCode 136 — Single Number（C++ Java Python）

2014-02-20 15:43:27

#### 136. Single Number [medium] (Python)

2016-07-29 14:30:31

#### LeetCode 136：Single Number I

2015-05-12 19:51:37

#### LeetCode 136. Single Number 题解（C++）

2016-09-29 12:07:25

#### python--leetcode136. Single Number

2017-10-08 19:54:07

#### LeetCode-136. Single Number (Java)

2017-06-10 13:47:01

#### 【LeetCode-面试算法经典-Java实现】【136-Single Number（只出现一次的数字）】

2015-08-18 06:18:14

#### LeetCode[136] Single Number 位运算异或，HashMap（Java）

2015-05-29 10:28:50

#### LeetCode 136 -Single Number ( JAVA )

2016-04-05 16:58:51

#### [C++]Single Number 单个数字

2015-08-17 15:18:21