Easy Java Solution || HashMap
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:\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 boolean isFascinating(int n) {\n        int a = n*2;\n        int b = n*3;\n        HashSet<Integer> hp = new HashSet<>();\n        while(a!=0){\n            int r = a%10;\n            if(hp.contains(r)) return false;\n            hp.add(r);\n            a=a/10;\n        }\n\n        while(b!=0){\n            int r = b%10;\n            if(hp.contains(r)) return false;\n            hp.add(r);\n            b = b/10;\n        }\n\n        while(n!=0){\n            int r = n%10;\n            if(hp.contains(r)) return false;\n            hp.add(r);\n            n=n/10;\n        }\n\n        System.out.println(hp);\n        if(hp.contains(0) || hp.size()!=9) return false;\n        return true;\n    }\n\n}\n```
['Java']