136. 只出现一次的数字
class Solution {
public:
int singleNumber(vector<int>& nums) {
int n=0;
for(auto a:nums)
{
n^=a;
}
return n;
}
};
class Solution {
public:
int singleNumber(vector<int>& nums) {
int n=0;
for(auto a:nums)
{
n^=a;
}
return n;
}
};