Question d’entretien chez JDRF Electromag

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