Amazon Interview Question for Software Engineer / Developers






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

something similar to like adjacency list....use hashing to get a index (hash value) for the movie name and store the rating of each user as a node in the list.

- amm February 25, 2011 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 votes

Hi amm,
if you use the adjacency list you have to store the elements in the sorted order...? do you agress this..?
and thn u have to count the no of each rating....

- Nik September 21, 2011 | Flag
Comment hidden because of low score. Click to expand.
0
of 0 votes

Maybe we can use the two adjacency lists one for movie movie name which is master and other is for the ratings for e.g. each movie contains 5 secondary adjacency lists i.e. from 1-5...
and secondary list contains the header which contains the max count....
let me know your opinion..

- Nik September 21, 2011 | Flag
Comment hidden because of low score. Click to expand.
0
of 0 vote

may be a simple hash map: <movie's name, ratings>. depends on needs, ratings could be a single number, or a an array list of different rates.

- Hamed February 25, 2011 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 votes

dont we need to store a 'movie_id' field as well to handle duplicate movie names?

- Anonymous February 27, 2011 | Flag
Comment hidden because of low score. Click to expand.
0
of 0 vote

Yes . Agreed !

- @ hamed February 25, 2011 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

i think first we should ask what operations are likely to be performed on this data

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

Yes the hashTable i think is not the right solution as we will be using a particular method to find the rating too (Basic operation).
so in that case we need to have No of users too , some other data structure to make it look the same ..

- Anonymous March 02, 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