c++ hasmaps
\n\n# Code\n\nclass Solution {\npublic:\n    bool digitCount(string num) {\n        unordered_map<int,int>mp;\n        for(int i=0;i<num.length();i++){\n       
\n\n# Code\n```\nclass Solution {\npublic:\n    bool digitCount(string num) {\n        unordered_map<int,int>mp;\n        for(int i=0;i<num.length();i++){\n            mp[num[i]-\'0\']++;\n        }\n        for(int i=0;i<num.length();i++){\n            if(mp[i]!=(num[i]-\'0\'))return false;\n        }\n        return true;\n        \n    }\n};\n```
['Hash Table', 'C++']