C++ Solution
Easily understandable for beginner level.\n\n    vector<int> findLonely(vector<int>& nums) {\n        vector<int> res;\n        int n = nums.size();\n        if
Easily understandable for beginner level.\n```\n    vector<int> findLonely(vector<int>& nums) {\n        vector<int> res;\n        int n = nums.size();\n        if(n==1) return nums;\n        \n        sort(nums.begin(),nums.end());\n        if(n==2 && nums[1]-nums[0]>1) return nums;\n        if(nums[0]!=nums[1] && nums[1]-nums[0]>1) \n            res.push_back(nums[0]);\n        if(nums[n-1]!=nums[n-2] && nums[n-1]-nums[n-2]>1) \n            res.push_back(nums[n-1]);\n        for(int i= 1;i<n-1;i++){\n            if(nums[i]!=nums[i-1] && nums[i]-nums[i-1]>1 && nums[i]!=nums[i+1] && nums[i+1]-nums[i]>1)\n                res.push_back(nums[i]);\n        }\n        return res;\n    }\n```\n**LEAVE COMMENTS IF ANY QUERRIES!**
['C']