Amazon Coding Interview Question - Group Anagrams - Leetcode 49

preview_player
Показать описание
FAANG Coding Interviews / Data Structures and Algorithms / Leetcode
Рекомендации по теме
Комментарии
Автор

Master Data Structures & Algorithms For FREE at AlgoMap.io!

GregHogg
Автор

Or just sort the word then use that as a key

hadizorkot
Автор

Convert the char to an index of binary, make a key that contains the total binary value and the length that is the hashmap key and push the current value. You will get the right result with one loop.

teamgartz-motorsports
Автор

What do you mean that the key of the hashmap will be the frequency? Are you using the array as the key?

asheykamp
Автор

So if there were a cta and caaat too then it would return [[cat, tac, cta, caaat], ...],
Characters could have been stored in a bitarray that could be in an integer, I don't know if this is what happens in the code

casperhansen
Автор

Would act be counted as a possible anagram to cat?

frankieolguin
Автор

Just add asc keys of letters and group words which have same count

atirchaudary
Автор

Understood the concept but I can’t understand the code

VAIBHAVMALHOTRA
Автор

Your solution is faulty if cat and taac are checked

abbudeh
Автор

now solve it in a language without dictionaries, maps, or tuples

mazthespaz
visit shbcf.ru