Kotlin Short & Easy Solution 264ms, faster than 50.00%
just do what the problem says, along with 1 edge case\n\nclass Solution {\n    fun digitCount(num: String): Boolean {\n        val map = num.groupingBy { it }.e
just do what the problem says, along with 1 edge case\n```\nclass Solution {\n    fun digitCount(num: String): Boolean {\n        val map = num.groupingBy { it }.eachCount()\n        return num.indices.all {\n            val count = map[(\'0\'..\'9\').toList()[it]] ?: 0\n            count == num[it].toString().toInt()\n        }\n    }\n}\n```
['Kotlin']