Pergunta de entrevista da empresa Qualtrics

Q: Given an array of string, group the anagrams.

Resposta da entrevista

Sigiloso

20 de dez. de 2016

Robin-Karp runs in O(N^2) there was a way to do it in O(N). make a hashmap with > for each string: sort string alphabetically by letter if sorted string is in hashmap: add string to corresponding list else: create a new list, add string to it, put list in hashmap return map.values()