Pergunta de entrevista da empresa Allstate

Anagram question. Can you find an algorithm of n complexity instead of and avoid sorting without O(logn)