Load Factor & Rehashing:
- We need to modify the size of hash table by using load factor and rehashing technique when we need to store more elements from each location of hash table.
- It is taking time to search for an element when the elements in linear fashion.
- In some of the situations even hash table also stores elements in linear form when the keys are always from same index.
- The concept of rehashing is allowing number of elements which are connected from same index is restricted.
- Once the load has reached, we increase the size of hash table and re-arrange the elements according the new size of hash table.
- How many element need to store from the each location of Hash table.
- Load Factor value must be less than 1
- According to rehashing algorithm, the standard value of load factor is 0.75
According to load factor, we can store maximum of 4 elements from each index, when the hash table size is 6.