add solution for anagrams problem