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.
In java hashmap works on Key and value pair.Hashmap consists of hashtable.
- pankajpimpalkar1989 November 03, 2015An instance of Hashtable has two parameters that affect its performance: initial capacity and load factor.
The capacity is the number of buckets in the hash table, and the initial capacity is simply the capacity at the time the hash table is created
The initial capacity is 16 and default load factor is 0.75.The threshold value come around 12.
When we call put method :
put<K,V>
then the hashcode is generated for the key and then it will call the hash function to get the index value in the range of hash bucket and value is getting stored at that particular generated index.If the hashcollision happens then equals come in to the picture and will check the hashcode and if it is same then will override the value or else create the linklist and shift the original value to next and stored in first.
The hashbucket contain the <K, V, hascode, next pointer>
When we call get method:
get<k> then the hashcode is generated for the key and then it will call the hash function to get the index value in the range of hash bucket.
If the entry is null then it will return null or else will check with K key with equals method and if found return the value.
Hashmap follows one thumb rule:
if two values are equals means the hashcode will be same but the vise-versa is not applicable.