Leetcode 136 Solution
This article provides solution to leetcode question 136 (single-number)
Access this page by simply typing in "lcs 136" in your browser address bar if you have bunnylol configured.
Leetcode Question Link
https://leetcode.com/problems/single-number
Solution
class Solution {
public:
int singleNumber(vector<int>& nums) {
int x = 0;
for (auto it = nums.begin(); it != nums.end(); it++)
{
x ^= *it;
}
return x;
}
};