✅✅✅C++ | easy to grasp | beats 100%🔥🔥🔥
Intuition\n Describe your first thoughts on how to solve this problem. \n\n# Approach\n Describe your approach to solving the problem. \n\n# Complexity\n- Time 
# Intuition\n<!-- Describe your first thoughts on how to solve this problem. -->\n\n# Approach\n<!-- Describe your approach to solving the problem. -->\n\n# Complexity\n- Time complexity:\n<!-- Add your time complexity here, e.g. $$O(n)$$ -->\n\n- Space complexity:\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\n\n# Code\n```\nclass Solution {\npublic:\n    vector<int> findLonely(vector<int>& nums) {\n        int freq[1000002] = {0};\n        vector<int> ans;\n        for(auto it : nums){\n            freq[it]++;\n        }\n        for(auto it : nums){\n            if(freq[it] == 1 && (!it || !freq[it-1]) && !freq[it+1]){\n                ans.push_back(it);\n            }\n        }\n        return ans;\n    }\n};\n```
['Array', 'Hash Table', 'Counting', 'C++']