一、只出现一次的数字
class Solution {
public:
int singleNumber(vector<int>& nums)
{
int res = ;
for (auto num : nums)
res ^= num;
return res;
}
};
class Solution {
public:
int singleNumber(vector<int>& nums)
{
int res = ;
for (auto num : nums)
res ^= num;
return res;
}
};