View All num of num See all Photos Amazon.com www.amazon.com Engaged Employer Overview Reviews Salaries Interviews Jobs Photos Benefits 4.7k Reviews 11k Salaries 6.0k Interviews 10k Jobs Follow Add Interview Follow Add Interview Interview Question Software Design Engineer In Test Interview Seattle, WA Amazon.com find if 2 strings are anagrams Tags: See more , See less 8 Answer Add Tags Answer Interview Answer 5 Answers ▲ 0 ▼ hash Interview Candidate on Jul 28, 2012 ▲ 3 ▼ Hash what, lol ? :)))You simply need to alphabetically sort characters in strings and then compare the result. Jack on Aug 11, 2012 ▲ 2 ▼ think about the time complexity. Whats the time complexity of the sorting? NlogNAnd when using hash mapping, it can be only N. Mapping the string to an alphabet array, the index is the char and the value stores the frequency of the char. Hope it helps. xli on Sep 23, 2012 ▲ 0 ▼ easiest way probably to reduce the characters to ascii, add them all together. If values are equal, they all contain the same characters. O(n) B on Oct 2, 2012 ▲ 0 ▼ Just reverse one string and then compare the result with other string. San on Apr 7, 2015 Interviews > Software Design Engineer In Test > Amazon.com Add Answers or Comments To comment on this, Sign In or Sign Up.