Pergunta de entrevista da empresa EarnUp

Write a function to compare two strings and return whether they are anagrams.