short code in c
IntuitionApproachComplexity
Time complexity:

Space complexity:
Code
# Intuition
<!-- Describe your first thoughts on how to solve this problem. -->

# Approach
<!-- Describe your approach to solving the problem. -->

# Complexity
- Time complexity:
<!-- Add your time complexity here, e.g. $$O(n)$$ -->

- Space complexity:
<!-- Add your space complexity here, e.g. $$O(n)$$ -->

# Code
```c []
#include <stdio.h>
#include <string.h>

int digitCount(char* num) 
{
    int len = strlen(num);
    
    for(int i = 0; i < len; ++i) {
        int freq = 0;
        for(int j = 0; j < len; ++j) {
            if(num[j] == '0' + i) {
                freq++;
            }
        }
        if(num[i] - '0' != freq) { // check if frequencies of digit i is equal to num[i]
            return 0; // false
        }
    }
    return 1; // true
}

```
['C']