easy cpp solution
\nclass Solution {\npublic:\n    bool digitCount(string num) {\n        unordered_map<int,int>mp;\n        for(int i=0;i<num.size();i++){\n            mp[num[i]
```\nclass Solution {\npublic:\n    bool digitCount(string num) {\n        unordered_map<int,int>mp;\n        for(int i=0;i<num.size();i++){\n            mp[num[i]-\'0\']++;\n        }\n        \n        for(int i=0;i<num.size();i++){\n            \n            if(mp[i]==num[i]-\'0\') continue;\n            else return false;\n        }\n        return true;\n    }\n};\n```
['C++']