[Java] Simple Solution || HashMap || O(n)
\nclass Solution {\n    public List<Integer> findLonely(int[] nums) {\n        Map<Integer,Integer> map = new HashMap<>();\n        List<Integer> res = new Arra
```\nclass Solution {\n    public List<Integer> findLonely(int[] nums) {\n        Map<Integer,Integer> map = new HashMap<>();\n        List<Integer> res = new ArrayList<>();\n\n        for(int i : nums)map.put(i,map.getOrDefault(i,0)+1);\n        for(int i : nums){\n            if(map.get(i) == 1 && map.containsKey(i+1) == false && map.containsKey(i-1) == false){\n                res.add(i);\n            }\n        }\n\t\t\n        return res;\n    }\n}\n```\n**O(n) : Time\n\tO(n) : Space**
['Java']