Easy approach
\n# Complexity\n- Time complexity: O(n^2)\n Add your time complexity here, e.g. O(n) \n\n- Space complexity:O(n)\n Add your space complexity here, e.g. O(n) \n\
\n# Complexity\n- Time complexity: O(n^2)\n<!-- Add your time complexity here, e.g. $$O(n)$$ -->\n\n- Space complexity:O(n)\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\n\n# Code\n```\nclass Solution {\nbool digitCount(String num) {\n for (int i = 0; i < num.length; i++) {\n    int count = 0;\n\n    for (int j = 0; j < num.length; j++) {\n      if (int.parse(num[j]) == i) {\n        count++;\n      }\n    }\n\n    if (count != int.parse(num[i])) {\n      return false;\n    }\n  }\n\n  return true;\n  }\n}\n```
['Dart']