Very easy C++ Solution , using 1 For loop 😴
\nclass Solution {\npublic:\n    bool digitCount(string num) {\n        for(int i=0;i<num.length();i++){\n\t\t\t// int to char\n            char ch =  i + \'0\'
```\nclass Solution {\npublic:\n    bool digitCount(string num) {\n        for(int i=0;i<num.length();i++){\n\t\t\t// int to char\n            char ch =  i + \'0\';\n\t\t\t\n\t\t\t// count no. of occurance\n            int req = count(num.begin(),num.end(),ch);\n\t\t\t\n\t\t\t// check the given condtion\n            if(req!=(num[i]-\'0\'))     return false;\n        }\n        return true;\n    }\n};\n```
['C']