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