Key components of double hashing
Now that we know what double hashing is, let's look at the structure of a hash table implemented using double hashing. The hash table is just an encapsulation around an array that stores key-value pairs. Different pieces have to be put together to create a hash table. Let's look at all the components and functions needed to implement a double hashing hash table.
Record
Like quadratic probing, in a double hashing implementation of a hash table, each index in the internal array stores only one record, and collisions are handled by finding the next available free slot. For this reason, we store the key-value mapping and additional metadata to identify the type of slot (empty, deleted, or occupied) at each index in the array.
Liking the course? Check our discounted plans to continue learning.