Beginners Approach
\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# 
\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 boolean isFascinating(int n) {\n     String res= (n)+""+(n*2)+""+(n*3);\n     \n\n     \n\n     if(res.contains("0")) return false;\n     if(res.length()>9) return false;\n     HashSet<Character> set= new HashSet<>();\n     for(int i=0;i<res.length();i++){\n         char c= res.charAt(i);\n         set.add(c);\n     }\n\n     return set.size()==9 ? true: false; \n    }\n}\n```
['Java']