Amazon Interview Question for Software Engineer / Developers






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

Cons of having hash table big enough to reduce chances of collision:

1. Lot os space (memory)is used up.
2. if there aren't enough items in the hash, then the space allocated gets wasted.

- Anonymous February 22, 2007 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 votes

apart from the above mentioned reasons,
if there is data skew, then increasing space does not help in avoiding collisions.

- Anonymous June 13, 2010 | Flag
Comment hidden because of low score. Click to expand.
0
of 0 vote

The reason a hash table is accessible in O(1) time is that it's stored in a contiguous block of memory, where each hash value corresponds to a specific memory address. Thus, the more spaces available in a hash table, the more memory it takes up.

- Nex3 December 22, 2006 | 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