View All num of num See all Photos Amazon.com This employer has taken extra steps to respond to reviews and provide job seekers with accurate company information, photos, and reviews. Interested for your company?Learn More. www.amazon.com www.amazon.com Work in HR? Unlock Free Profile Overview Reviews Salaries Interviews Jobs Photos Benefits 4.0k Reviews 11k Salaries 5.4k Interviews 10k Jobs Follow Add Review or Salary Follow Add Review or Salary Amazon.com 3960 Interview Question Software Engineer Intern Interview(Student Candidate) Amazon.com Given a keyword (ex: "abc") and a list of words (ex "cab", "ab"), write a function that will return all words in the list that are the same/anagrams of the keyword. In this case, "cab" would be the only word returned. Later changes to the function were added: numbers and symbols might be included in the words but were to be ignored ("ca2b" still matched "abc"), make the function not case sensitive ("A" == "a"), etc... Tags: technical See more , See less 8 Answer Add Tags Flag as Inappropriate Thank you! Your feedback has been sent to the team and we'll look into it. Oops! We're sorry but your feedback didn't make it to the team. Your input is valuable to us — would you mind trying again? Send Answer Interview Answer 1 Answer ▲ 0 ▼ First, I hashed the keyword, making the letter the key and the number of times it appears a value. I did the same thing to the words in the list, skipping words that weren't the same length as the keyword (removed once he added the condition to ignore numbers and symbols). There were also other optimizations added.Also, if you use a hashmap or any data structure, be prepared to answer why you used it. (Runtime, etc) Interview Candidate on Mar 2, 2014 Flag as Inappropriate Thank you! Your feedback has been sent to the team and we'll look into it. Oops! We're sorry but your feedback didn't make it to the team. Your input is valuable to us — would you mind trying again? Send Add Answers or Comments To comment on this, Sign In or Sign Up.