Old Mission Interview Question

Algorithm to compare anagrams. and the complexity