Straightforward
\nclass Solution {\npublic:\n    bool digitCount(string nums) {\n        unordered_map<int,int> umap;\n        for(int i=0;i<nums.length();i++)\n        {\n    
```\nclass Solution {\npublic:\n    bool digitCount(string nums) {\n        unordered_map<int,int> umap;\n        for(int i=0;i<nums.length();i++)\n        {\n            string temp="";\n            temp+=nums[i];\n            int n=stoi(temp);\n            umap[n]++;\n        }\n        for(int i=0;i<nums.length();i++)\n        {\n            string temp="";\n            temp+=nums[i];\n            int n=stoi(temp);\n            \n            //Number of times expected != Number of times occured \n            if(n!=umap[i])\n                return false;\n                \n        }\n        return true;\n    }\n};\n```\n**Like it? Please Upvote ;-)**
['C', 'C++']