Beginners Friendly
\n# Complexity \n- Time complexity: O(N)\n Add your time complexity here, e.g. O(n) \n\n- Space complexity: O(N)\n Add your space complexity here, e.g. O(n) \n\
\n# Complexity \n- Time complexity: O(N)\n<!-- Add your time complexity here, e.g. $$O(n)$$ -->\n\n- Space complexity: O(N)\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\n\n# Code\n```\nclass Solution {\n    public List<Integer> findLonely(int[] nums) {\n        List<Integer> ls= new ArrayList<>();\n        HashMap<Integer, Integer> map= new HashMap<>();\n        for(int i:nums) map.put(i, map.getOrDefault(i,0)+1);\n\n        for(int j: nums){\n            if(map.containsKey(j-1) || map.containsKey(j+1) || map.get(j)>1) continue;\n            else ls.add(j);\n        }\n\n        return ls;\n    }\n}\n```
['Java']