Amazon Interview Question for Software Engineer / Developers






Comment hidden because of low score. Click to expand.
0
of 0 vote

Sort both words and check if they are same.

- CuriousCrab June 22, 2008 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

Take an int array of same size.
1- increment the array value for each caharacter at the ascii index value of each character.
2- reduce the value for the next array.
3- incase we have a +ve or -ve value for any index... its not an anagram.

- Neel July 30, 2009 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

give the algorithm for checking anagram => Do you mean ...an algo to say whether 2 words are anagrams or not ? OR
Generate all the possible anagrams for a given word ?

- Anonymous August 23, 2009 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

One Can only Generate permutations for words/sentences , but i dont think its possible to generate anagrams by writing a program for a given word/sentence ( unless & otherwise there is a huge database of meaningful words which you have to search ), so the question should be given two words , just check whether they are anagrams or not ..

- Anonymous September 01, 2009 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

Sorting would take more time i.e O(NlogN).

Having a separate array of size => char set size. apply the logic of "NEEL".
This would take O(N).

- master January 03, 2010 | Flag Reply


Add a Comment
Name:

Writing Code? Surround your code with {{{ and }}} to preserve whitespace.

Books

is a comprehensive book on getting a job at a top tech company, while focuses on dev interviews and does this for PMs.

Learn More

Videos

CareerCup's interview videos give you a real-life look at technical interviews. In these unscripted videos, watch how other candidates handle tough questions and how the interviewer thinks about their performance.

Learn More

Resume Review

Most engineers make critical mistakes on their resumes -- we can fix your resume with our custom resume review service. And, we use fellow engineers as our resume reviewers, so you can be sure that we "get" what you're saying.

Learn More

Mock Interviews

Our Mock Interviews will be conducted "in character" just like a real interview, and can focus on whatever topics you want. All our interviewers have worked for Microsoft, Google or Amazon, you know you'll get a true-to-life experience.

Learn More