Interviews7 answers
What is the load factor of Hash Table?
7 Answers
The load factor is a measure of how full the hash table is allowed to get before its capacity is automatically increased. When the number of entries in the hash table exceeds the product of the load factor and the current capacity, the hash table is rehashed (that is, internal data structures are rebuilt) so that the hash table has approximately twice the number of buckets.
Ajay GandhiPosted Nov 20, 2015, 12:58 AM EST
Hashtable optimizes lookups. It computes a hash of each key you add. It then uses this hash code to look up the element very quickly. It is an older .NET Framework type. It is slower than the generic Dictionary type.
Posted May 12, 2015, 1:33 AM EDT
In computing, a hash table (hash map) is a data structure used to implement an associative array, a structure that can map keys to values. A hash table uses a hash function to compute an index into an array of buckets or slots, from which the correct value can be found.
Posted Apr 15, 2015, 7:19 PM EDT
Load factor of a hashtable (a) = # of keys / # of buckets
a directly regulates the time-complexity of a search (or insert) operation on a hashtable.
Though, the hashtable data structure gives a guarantee of O(1) insert/lookup time, an overloaded (a > 1) hashtable can result in O(n) operations (though the operations are also affected by the method of probing, viz. chaning or open addressing).
The expectation of a successful search for a key in a hashtable is given by :
E(successful probe) = 1 / (1-a)
Vaibhav SinghPosted Mar 11, 2015, 7:48 AM EDT
The load factor is a measure of how full the hash table is allowed to get before its capacity is automatically increased
mahesh sutharPosted Feb 10, 2015, 6:45 AM EST
2
venigalla mahithaPosted Jan 20, 2015, 11:12 PM EST
0.72
Harieswaran DPosted Dec 21, 2014, 6:10 PM EST


