filmov
tv
Group Anagrams

Показать описание
Name: Group Anagrams
Category of Data Structure: Arrays and Strings
Category of Technique: Order-Independent Character Counter of a String
Difficulty: Medium
Complexity Analysis of the Answer:
1. Order-Independent Character Counter of a String
Time complexity O(m*n), where m is len(strs) and n is the len(string), for string in strs; traverse through this many # of characters
Space complexity O(m*n), for storing the res array as a list of lists
Category of Data Structure: Arrays and Strings
Category of Technique: Order-Independent Character Counter of a String
Difficulty: Medium
Complexity Analysis of the Answer:
1. Order-Independent Character Counter of a String
Time complexity O(m*n), where m is len(strs) and n is the len(string), for string in strs; traverse through this many # of characters
Space complexity O(m*n), for storing the res array as a list of lists