[Python3] Runtime: O(n)
\nfrom collections import defaultdict\nclass Solution:\n    def findLonely(self, nums: List[int]) -> List[int]:\n        check = defaultdict(int)\n        for i
```\nfrom collections import defaultdict\nclass Solution:\n    def findLonely(self, nums: List[int]) -> List[int]:\n        check = defaultdict(int)\n        for i in nums:\n            check[i] += 1\n        ans = []\n        for i in nums:\n            if ((i==0) or (i>=1 and check[i-1]==0)):\n                if check[i]==1 and check[i+1]==0:\n                    ans.append(i)\n        return ans\n```
['Python']