cpp easy
\nclass Solution {\npublic:\n    vector<int> findLonely(vector<int>& nums) {\n        vector<int>ans;\n        int n=nums.size(),i;\n        unordered_map<int,i
```\nclass Solution {\npublic:\n    vector<int> findLonely(vector<int>& nums) {\n        vector<int>ans;\n        int n=nums.size(),i;\n        unordered_map<int,int>m;\n        for(i=0;i<n;i++)\n            m[nums[i]]++;\n        for(i=0;i<n;i++){\n            if(m.find(nums[i]+1)==m.end() && m.find(nums[i]-1)==m.end() && m[nums[i]]==1)\n                ans.push_back(nums[i]);\n        }\n        return ans;\n    }\n};\n```
['C++']