Johnson Controls Interview Question

Devise an algorithm to check if two strings are anagrams.