Simple C++ Solution Using HashMap
\nclass Solution {\npublic:\n    vector<int> findLonely(vector<int>& nums) {\n        unordered_map <int,int> mp;\n        for(int i=0;i<nums.size();i++)\n     
```\nclass Solution {\npublic:\n    vector<int> findLonely(vector<int>& nums) {\n        unordered_map <int,int> mp;\n        for(int i=0;i<nums.size();i++)\n            mp[nums[i]]++;\n        vector <int> ans;\n        for(auto &it:mp)\n            if(it.second == 1 && !mp.count(it.first-1) && !mp.count(it.first+1))\n                ans.push_back(it.first);\n        return ans;\n    }\n};\n```
['C', 'C++']