Question: Write a function to check if two strings are anagrams. Write a fuction to find all possible anagrams of a given string. You are given a method isWord() to check if the string is a valid word in a dictionary. Assuming that pre processing can be done what pre processing will u do inorder to speed up the process of finding anagrams.

Solution: Many ways possible.
e.g For only alphabet character string
input : string1, string2 (to be checked)

step 1: allocate two integer array c1[26], c2[26]
step 2: initialize elements of array c1, c2 to zero

step 3 : for each character in string1
increment corresponding element in c1 by one (ex : for 'a', c[0]++)

step 4 : for each character in string2
decrement corresponding element in c2 by one (ex : for 'a', c[0]--)
step 5:Check if all c[i] is zero, if zero then It's an anagram.