Given two arrays of words (strings) determine how many of the words in the first array are anagrams of any word in the second array.
This array of strings will contain words. Each word consists of lower case English alphabets only. The length of each word will be at most 20 characters. This array will have up to 5000 strings in it.
This array of strings will contain words just like the other array. This array will have up to 10,000 strings in it.
Return the total number of words in the words array that have their anagrams in the dictionary array.
countAnagrams(["cat","team","arc","cow","sing"], ["act","mouse","car","fish","kitten"]) ⇒ 2 |
countAnagrams(["cow","hen"], ["cat","dog"]) ⇒ 0 |