simple solution
simple solution in java using hash table\n\nclass Solution {\n    public boolean digitCount(String num) {\n        int[] freq=new int[10];\n        for(int i=0;
simple solution in java using hash table\n```\nclass Solution {\n    public boolean digitCount(String num) {\n        int[] freq=new int[10];\n        for(int i=0;i<num.length();i++)\n        {\n            int c=num.charAt(i)-\'0\';\n            freq[c]++;\n        }\n        for(int i=0;i<num.length();i++){\n            int a=num.charAt(i)-\'0\';\n            if(a!=freq[i])\n                return false;\n        }\n        return true;\n    }\n}\n```
['Hash Table', 'Java']