Given an array of integers, every element appears twice except for one. Find that single one.
class Solution {
public:
int singleNumber(vector<int>& nums) {
int size=nums.size();
if(size==||nums.empty())
return ;
int res=;
for(int i=;i<size;++i)
res^=nums[i];
return res;
}
};