fix bug in anagram.cpp