simple java solution
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)$$ -->\n\n- Space complexity:\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\n\n# Code\n```\nclass Solution {\n    public boolean digitCount(String num) {\n        int[]arr = new int[10];\n\n      for(int i=0;i<num.length();i++){\n          arr[num.charAt(i)-\'0\']+=1;\n      }\n      //System.out.println(Arrays.toString(arr));\n   \n\n      for(int i=0;i<num.length();i++){\n          if(arr[i]!=num.charAt(i)-\'0\'){\n              return false;\n          }\n      }\n     return true;\n        \n    }\n}\n```
['Java']