Posted on July 5, 2021 Description Submission class Solution { public: int singleNumber(vector<int>& nums) { map<int, int> cnt; for(auto x: nums) { ++cnt[x]; } for(auto [key, val]: cnt) { if(val == 1) return key; } return -1; } }; By Bill0412 LeetCode Medium