Yelp interview question

Code a function to detect anagrams in an array.