Extendible hashing is a dynamic approach to managing data. In this hashing method, flexibility is a crucial factor. This method caters to flexibility so that even the hashing function dynamically changes according to the situation and data type.
The following illustration represents the initial phases of our hashtable:
Directories and buckets are two key terms in this algorithm. Buckets are the holders of hashed data, while directories are the holders of pointers pointing towards these buckets. Each directory has a unique ID.
The following points explain how the algorithm work:
By implementing the steps above, it will be evident why this method is considered so flexible and dynamic.
Let's take the following example to see how this hashing method works where:
Convert the data into binary representation:
The following slideshow represents the remaining steps:
Advantages | Disadvantages |
Less costly data retrieval. | Memory wastage due to certain buckets containing more data than the others. |
The dynamic approach avoids data loss. | Complicated coding. |
Free Resources