add anagram into equal string case in String Comparator for solution 2