Brute-Force | C++ | Easy to understand
\nclass Solution {\npublic:\n    bool digitCount(string num) {\n        unordered_map<char,int> mp;\n        for(int i=0;i<num.length();i++)\n        {\n       
```\nclass Solution {\npublic:\n    bool digitCount(string num) {\n        unordered_map<char,int> mp;\n        for(int i=0;i<num.length();i++)\n        {\n             mp[num[i]]++;\n        }\n        for(auto ele: mp)\n        {\n            \n            if(ele.second!=num[ele.first-\'0\']-\'0\')\n                return false;\n        }\n        return true;\n        \n    }\n};\n```
['C', 'C++']