Python || Using hashmap || Simple Linear Approach
Please upvote if it helps\n\nclass Solution:\n    def findLonely(self, nums: List[int]) -> List[int]:\n        counter=defaultdict(int)\n        ans=[]\n       
**Please upvote if it helps**\n```\nclass Solution:\n    def findLonely(self, nums: List[int]) -> List[int]:\n        counter=defaultdict(int)\n        ans=[]\n        for i in nums:\n            counter[i]+=1\n        for i in nums:\n            if counter[i-1] or counter [i+1] or counter[i]>1: continue\n            ans.append(i)\n        return ans\n        \n```\nTime and space complexity : O(N)
['Python']