Your question is Anagram Counting. Start with the requirements on the right.
Run and submit as often as you like. When you're ready, talk me through your approach or go straight to the code.
Vumedi search suggestions may contain several terms formed from the same letters as a target term. Given a lowercase word w and a list of lowercase words words, return how many entries in words are anagrams of w.
Two words are anagrams when they contain exactly the same characters with the same frequencies. Count duplicate entries separately. The comparison is case-sensitive by contract, and every input character is a lowercase English letter.
Implement count_anagram_words(w, words).
w, a non-empty string, and words, a list of strings.words whose character multiset matches w.def count_anagram_words(w, words):