JDRF Electromag interview question

How would you determine if two strings are anagrams? Provide an algorithm with optimal time complexity.