Conversation
|
Your solution for the Group Anagrams problem is correct and efficient. You have correctly used a frequency array to generate a unique key for each anagram group. The code is clean and easy to understand. Well done! However, I notice that you included solutions for other problems (isIsomorphic and wordPattern) in the same submission. For future assignments, make sure to only submit the solution for the problem you are being evaluated on. This helps in keeping the evaluation focused. One minor suggestion for the Group Anagrams solution: instead of using For example: StringBuilder keyBuilder = new StringBuilder();
for (int count : freq) {
keyBuilder.append(count).append('#');
}
String word = keyBuilder.toString();But your current solution is correct and efficient as is. |
No description provided.