Java code with O(n^2) Complexity
\n# Complexity\n- Time complexity:\nO(n^2)\n\n- Space complexity:\nO(26)\n\n# Code\n\nclass Solution {\n    public boolean makeEqual(String[] words) {\n        
\n# Complexity\n- Time complexity:\nO(n^2)\n\n- Space complexity:\nO(26)\n\n# Code\n```\nclass Solution {\n    public boolean makeEqual(String[] words) {\n        int[] ar=new int[26];\n        for(int i=0;i<words.length;i++){\n            for(int j=0;j<words[i].length();j++){\n                ar[words[i].charAt(j)-\'a\']++;\n            }\n        }\n        for(int i=0;i<26;i++){\n            if(ar[i]%words.length==0);\n            else return false;\n        }\n        return true;\n    }\n}\n```
['Java']