136. Single Number Posted on 2021-01-18 Edited on 2021-01-25 In LeetCode Disqus: Symbols count in article: 168 Reading time ≈ 1 mins. O(n) time O(1) space 12345678910class Solution {public: int singleNumber(vector<int>& nums) { int res = 0; for (int x : nums) { res ^= x; } return res; }};