Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/Hsinha11/Leetcode-solutions
/ singleNumber
Method
singleNumber
136. SingleNumber/136. Single Number.cpp:4–10 ·
view source on GitHub ↗
Source
from the content-addressed store, hash-verified
2
{
3
public:
4
int singleNumber(vector<int> &nums)
5
{
6
int ans = 0;
7
for (auto x : nums)
8
ans ^= x;
9
return ans;
10
}
11
};
Callers
nothing calls this directly
Calls
no outgoing calls
Tested by
no test coverage detected