EASY AND SIMPLE JAVA SOLUTION (WITH EXPLAINATION).
Intuition\n Describe your first thoughts on how to solve this problem. \n\n# Approach\n Describe your approach to solving the problem. \n\n# Complexity\n- Time 
# Intuition\n<!-- Describe your first thoughts on how to solve this problem. -->\n\n# Approach\n<!-- Describe your approach to solving the problem. -->\n\n# Complexity\n- Time complexity: 0(n)\n<!-- Add your time complexity here, e.g. $$O(n)$$ -->\n\n- Space complexity:\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\n\n# Code\n```\nclass Solution {\n    public List<Integer> findLonely(int[] nums) {\n        ArrayList<Integer>dhoni=new ArrayList<>();\n        HashMap<Integer,Integer>manas=new HashMap<>();\n        for(int i=0;i<nums.length;i++){\n            manas.put(nums[i],manas.getOrDefault(nums[i],0)+1);\n        }\n        for(int i:manas.keySet()){\n            if(!manas.containsKey(i-1)&&!manas.containsKey(i+1)&&manas.get(i)==1){\n                dhoni.add(i);\n            }\n        }\n        return dhoni;\n    }\n}\n```
['Java']