Solution to find if strings are anagrams