C++ || HASHING
\n\n# Code\n\nclass Solution {\npublic:\n    bool digitCount(string num) {\n        vector<int>v(10,0);   //to keep track of frequency of each digit\n        in
\n\n# Code\n```\nclass Solution {\npublic:\n    bool digitCount(string num) {\n        vector<int>v(10,0);   //to keep track of frequency of each digit\n        int n=num.size();\n\n        for(int i=0;i<n;i++){\n            int k=num[i]-\'0\';  //convert char to int\n            v[k]++;   //hashing\n        }\n\n        for(int i=0;i<n;i++){\n            int k=num[i]-\'0\';\n            if(v[i]!=k)return false;  //check if frequency of digit is equal to integer at that index\n        }\n        return true;\n    }\n};\n```
['Hash Table', 'String', 'Counting', 'C++']