Johnson Controls interview question

Devise an algorithm to check if two strings are anagrams.