Domanda di colloquio di Johnson Controls

Devise an algorithm to check if two strings are anagrams.