Amazon Interview Question

A question about anagram