Kotlin beats 100% 154 ms
\n\n# Complexity\n- Time complexity: O(M*N)\n Add your time complexity here, e.g. O(n) \n\n- Space complexity: O(1)\n Add your space complexity here, e.g. O(n) 
![\u0421\u043D\u0438\u043C\u043E\u043A \u044D\u043A\u0440\u0430\u043D\u0430 2023-12-30 115714.png](https://assets.leetcode.com/users/images/80e66152-be1e-4806-849c-1bd6528f2026_1703927279.072569.png)\n\n# Complexity\n- Time complexity: O(M*N)\n<!-- Add your time complexity here, e.g. $$O(n)$$ -->\n\n- Space complexity: O(1)\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\n\n# Code\n```\nclass Solution {\n    fun makeEqual(words: Array<String>): Boolean {\n        val charCount = IntArray(26) // array a..z\n\n    for (word in words) { // a loop for each word in words \n        for (char in word) { // loop for each character in word\n            charCount[char - \'a\']++ // add 1 to position of char in IntArray\n        }\n    }\n\n    for (count in charCount) {\n        if (count % words.size != 0) { // If count is not a multiple of the number of rows in the array -> false \n            return false\n        }\n    }\n    return true\n    }\n}\n\n```
['Kotlin']