Hyperface interview question

Sort the array according to the timestamps. Group anagram from strings.