Domanda di colloquio di Apple

Design an algorithm to check if two words are anagrams.