implemnet solution for Anagrams