As Calvin pointed out, its a pain to do the string length and other calculations, so I went back and rewrote the anagram calculation using the prime number trick. That is, assign a prime to each letter from ‘a’ to ‘z’, then you can easily tell if two words are anagrams by multiplying all the […]