java || 100% beats || 0(N) || ❤️
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:0(1)\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\n\n# Code\n```\nclass Solution {\n    public boolean digitCount(String num) {\n        char temp[] = new char[11];\n        int temp1 = 0 , temp2 = 0;\n        for(int i=0; i<num.length(); i++){\n            char ch = num.charAt(i); temp1 = ch-\'0\';\n            temp[temp1]++;\n        }\n        for(int i=0; i<num.length(); i++){\n            char ch = num.charAt(i); temp2 = ch-\'0\';\n            if(temp[i]!=temp2) return false;\n        }\n        return true;\n    }\n}\n```
['Java']