Python3 RunTime: 2051ms 59.44% memory: 38.4mb 53.48%
We can do this by using a set also, but when we going to use the count in sets set.count(x) == 1 I think thats an O(n) operation, so I thought hashMap is better
We can do this by using a set also, but when we going to use the count in sets set.count(x) == 1 I think thats an O(n) operation, so I thought hashMap is better for this.\nTimeComplex: O(N)\nSpace: O(N)\n```\ndef lonelyNum(arrList):\n\thashMap = dict()\n\tres = list()\n\tfor i in arrList:\n\t\thashMap[i] = 1 + hashMap.get(i, 0)\n\tfor key in hashMap:\n\t\tif hashMap[key] == 1 and not key+1 in hashMap and not key-1 in hashMap:\n\t\t\tres.append(key)\n\treturn res\n```
[]