Define double hashing?



Define double hashing?..

Answer / Brajesh Kumar Meena

Double hashing is a load distribution strategy used in hash tables to find an empty slot when the initial hash value results in a collision. In double hashing, two hash functions (h1 and h2) are used, where h1 maps keys to indices and h2 ensures that collisions are spread evenly across the table. If the cell at index h1(key) modulo table size is occupied, the search continues to cells at indices [h1(key)+i*h2(key)] modulo table size (where i starts from 1 and increments by one for each collision), wrapping around the table at both ends.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Data Structures Interview Questions

Does list maintain insertion order?

1 Answers  


What does bubble sort do?

1 Answers  


What is difference between hashset and linkedhashset?

1 Answers  


what is the need of data structure

11 Answers  


Which is the simplest file structure?

1 Answers  


When is a graph said to be weakly connected?

1 Answers  


What is sorting with example?

1 Answers  


What is bubble sort technique?

1 Answers  


How is the front of the queue calculated ?

1 Answers  


Why do we use trees in data structures?

1 Answers  


What is the average number of comparisons needed in a sequential search to determine the position of an element in an array of 100 elements, if the elements are ordered from largest to smallest?

19 Answers   ABB, SDE,


What are hashmaps good for?

1 Answers  


Categories