Amazon Interview Question for Software Engineer / Developers


Country: United States
Interview Type: Phone Interview




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

HashMap and HashTable are datastructures that implement dictionary (insert, remove, search) operations, using a hash funtion to identify the position of the key.
HashTable is synchronized while hash map is not. Also, hash map allows null values.
If we have a bad hashing algorithm, the time taken to search is O(n) instead of O(1) which is provided by a good hashing algorithm.
The values are stored in an array in java.

- Jaiprakash April 03, 2012 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

apart from syncronisation and null value, are there any differences between hashmap and hashtable???

- Anonymous April 04, 2012 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

apart from syncronisation and null value, are there any differences between hashmap and hashtable???

Rgds,
Sriraam

- Anonymous April 04, 2012 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

apart from syncronisation and null value, are there any differences between hashmap and hashtable???

Rgds,
Sriraam

- Sriraam April 04, 2012 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 votes

yaar sriram..stop this spam..

- Sriram_CHT April 18, 2012 | Flag
Comment hidden because of low score. Click to expand.
0
of 0 vote

Apart from Sync and null value:

HashMap can be typecasted to LinkedHashMap..and it will preserve the order of insertion of elements into the map..Where, a simple hash returns the elements in a random fashion....HashTable doesnt have this support.

- A January 22, 2013 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 votes

totally wrong, please chk the sun document 1st

- Tom July 15, 2013 | Flag


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