Pergunta de entrevista da empresa KnowBe4

Write an algorithm to determine if two strings are an anagram. Follow up on optimizations based on length of strings, error handling, refactoring, testing, etc.