Check if Number Has Equal Digit Count and Digit Value Solution in C++
Intuition\n Describe your first thoughts on how to solve this problem. \n\n# Approach\n Describe your approach to solving the problem. \n\n# Complexity\n- Time 
# Intuition\n<!-- Describe your first thoughts on how to solve this problem. -->\n\n# Approach\n<!-- Describe your approach to solving the problem. -->\n\n# Complexity\n- Time complexity:\n<!-- Add your time complexity here, e.g. $$O(n)$$ -->\nO(n^2)\n- Space complexity:\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\nO(1)\n# Code\n```\nclass Solution {\npublic:\n    bool digitCount(string num) {\n        int i, j, count=0;\n        for(i=0 ; i<num.length() ; i++)\n        {\n            count=0;\n            for(j=0 ; j<num.length() ; j++)\n            {\n                if(i==(int)num[j]-48)\n                {\n                    count++;\n                }\n            }\n            if((int)num[i]-48!=count)\n            {\n                return false;\n            }\n        }\n        return true;\n    }\n};\n```\n![upvote new.jpg](https://assets.leetcode.com/users/images/98f8d2dd-d2eb-4f98-991a-e52107e37b08_1685332542.106816.jpeg)\n
['C++']