Red Ventures interview question

Write an algorithm for anagram