# [leetcode] 【数组】 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 result=0;
for(auto i:nums)
result=result^i;
return result;
}
};

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

2014-02-20 15:43:27

#### LeetCode 136：Single Number I

2015-05-12 19:51:37

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

2016-07-29 14:30:31

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

2016-09-29 12:07:25

#### python--leetcode136. Single Number

2017-10-08 19:54:07

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

2015-08-18 06:18:14

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

2015-05-29 10:28:50

#### LeetCode || Single Number II

2014-04-09 23:35:07

#### LeetCode 136. 只出现一次的数字 Python

2018-05-30 16:12:19

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

2017-06-10 13:47:01