Pregunta de entrevista de Apple

Design an algorithm to check if two words are anagrams.