Untitled

mail@pastecode.io avatar
unknown
plain_text
20 days ago
200 B
2
Indexable
Never
class Solution {
public:
    int singleNumber(vector<int>& nums) {
        int ans = 0;
        for (int i = 0; i < nums.size(); i++)
            ans ^= nums[i];

        return ans;
    }
};
Leave a Comment