added the algorithm to check whether two strings are anagrams.