C# - Two lines, O(n) time/space
\npublic class Solution\n{\n    public IList<int> FindLonely(int[] nums)\n    {\n        var dict = nums.GroupBy(x => x).ToDictionary(g => g.Key, g => g.Count()
```\npublic class Solution\n{\n    public IList<int> FindLonely(int[] nums)\n    {\n        var dict = nums.GroupBy(x => x).ToDictionary(g => g.Key, g => g.Count());\n        return nums.Where(x => dict[x] == 1 && !dict.ContainsKey(x - 1) && !dict.ContainsKey(x + 1)).ToList();\n    }\n}\n```
[]