Lol  solution (  99% faster when I used gareeb approach instead of Data Structure  )
\n\nclass Solution {\n    public List<Integer> findLonely(int[] nums) {\n        int[] arr = new int[1000001] ;\n        List<Integer> result = new ArrayList<>(
```\n\nclass Solution {\n    public List<Integer> findLonely(int[] nums) {\n        int[] arr = new int[1000001] ;\n        List<Integer> result = new ArrayList<>() ;\n        for(int i : nums){\n            if(i>0)\n            arr[i-1]++ ;\n            arr[i]++ ;\n            if(i<1000000)\n            arr[i+1]++ ;\n        }\n        for(int i: nums){\n            if(arr[i]==1){\n                result.add(i) ;\n            }\n        }\n        return result ;\n    }\n}\n\n```
[]