Amazon interview question

Write anagram