Ebay Interview Question
Software Engineer / DevelopersCountry: United States
Interview Type: Phone Interview
is a comprehensive book on getting a job at a top tech company, while focuses on dev interviews and does this for PMs.
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.
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.
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.
Hashcode is generated using hashfunctions. We have different hash functions available, you can simply wiki about it.
Hash functions generate a hash key, we use that hash key as an index to store data in the hash table. But what if two objects have same hash values?
To solve this, one way is to create chain of pointers in one bucket.
This solution works fine for less number of collisions, but when number of collisions grow high, the search starts taking ~ O(n)
Another solution is, Open Addressing:
In this method, if some collision occurs, then instead of making a chain in the bucket, we find next available location in the same hash table, and then we store our value there.
We also have different type of methods to search next available position in the hash table.
- HauntedGhost March 07, 20131. Linear Probing: if the hash value is h and it collides then check at h+1
2. Quadratic Probing: if the hash value is h and it collides then increase the hash by 1^2, 2^2 , 3^2 and so on.
I think this should suffice.