<prompt> Kujenga algorithm kuangalia kama neno fulani ni anagram ya mwingine.  <response>: An anagram is a word or phrase formed by rearranging the letters of a different word or phrase, typically using all the original letters exactly once. Below is an algorithm to check if a given word is an anagram of another:1. Define is_anagramword1, word2 to take in two parameters, the two words to be checked.2. If the length of word1 is not equal to the length of word2, return False since they cannot be anagrams.3. Create a variable letters that is an empty dictionary to keep track of the count of letters in each word.4. Loop through word1 and count the occurrences of each letter. Store the counts in the letters dictionary.5. Loop through word2, for each letter, subtract one from its corresponding count in the letters dictionary if it exists, return false if letters doesnt contain such letter.6. Loop through the letters dictionary, if any value is not equal to zero, return False because those characters were not used in the anagram.7. Return True if the algorithm has gone through all the checks and passed.Here is an example python code to implement the algorithm:pythondef is_anagramword1, word2: if lenword1 ! lenword2: return False letters for letter in word1: if letter in letters: lettersletter 1 else: lettersletter 1 for letter in word2: if letter in letters: lettersletter - 1 else: return False for key in letters: if letterskey ! 0: return False return True 