Amazon Interview Question

question is about the arrays and strings. anagrams.