An anagram of a string is another string with the same characters in the same frequency, in any order. For example 'ab', 'bca, acb), 'bac', 'cba, 'cab' are all anagrams of the string 'abc'. Given two arrays of strings, for every string in one list, determine how many anagrams of it are in the other list. Write a function that receives dictionary and query, two string arrays. It should return an array of integers where each element i contains the number of anagrams of queryll that exist in dictionary.

Solved
Show answers

Ask an AI advisor a question