Amazon Interview Question for Software Engineer / Developers


Country: United States
Interview Type: In-Person




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

might be Trie, but again, we would choose Trie based on the type of data, like if its a phone book directory or something like that. For general approach, I think hash was appropriate ans, We can also use Red Black tree, which are used in databases, which would give us O(lgn) complexity for search, if I am not mistaken..

- Anonymous October 06, 2011 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

What are we searching anyway. Data structure would also depend on what data are we dealing with.

- Anonymous October 05, 2011 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 votes

Okay. Let me make my question more clear.
We have some information in the local memory. We need to design a datastructure from which we can retrieve the data based on the instant query made.
I tried to explain using trees and hashmaps. I guess he was expecting a Trie structure.

- srikanth88infy October 05, 2011 | Flag
Comment hidden because of low score. Click to expand.
0
of 0 votes

Okay. Let me make my question more clear.
We have some information in the local memory. We need to design a datastructure from which we can retrieve the data based on the instant query made.
I tried to explain using trees and hashmaps. I guess he was expecting a Trie structure.

- srikanth88infy October 05, 2011 | Flag
Comment hidden because of low score. Click to expand.
0
of 0 votes

Well, that would really depend on the requirements of the search feature.

- eugene.yarovoi October 09, 2011 | Flag
Comment hidden because of low score. Click to expand.
0
of 0 vote

IMHO, hash will be inappropriate for the "instant" search as you have to show the results while the query is being typed i.e. for incomplete queries. Trie should be more appropriate, maybe a modified version, depending upon the type and the amount of data we are dealing with.

- Anonymous October 07, 2011 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

Trie

- Mihir December 08, 2011 | 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