Goldman Sachs Interview Question for Software Engineer / Developers






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

I believe the interviewer is looking out for a more detail answer, including how hashcode is used and what happens when there is a hash collision

- Anonymous August 08, 2010 | Flag Reply
Comment hidden because of low score. Click to expand.
-1
of 1 vote

HashMap is an subclass of the Map collection - in java. a HashMap uses a hash function to effciently map certian identifiers or keys to associated values. Map and HashMap have a (key, value) pair where the key is the custom index and the value is the object to store. To add an element to the HasHMap you call the method .put(key, value). in the put() method inside the code a hashfunction hashcode the key into an index. to retrieve something from a HashMap you use the method .get(key) to get a single index. HashMaps can contain null values and duplicates. HashMaps are vulnerable to collisions due to the custom indexing and being able to duplicate

java implementation
HashMap<Object>() map1 = new HashMap<Object>();

- biggied88 March 04, 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