Hashing in Data Structure
Hashing in Data Structure
In data structures,
Hashing Mechanism-
In hashing,
An array data structure called as Hash table is used to store the data items.
Based on the hash key value, data items are inserted into the hash table.
Hash Key Value-
Hash key value is a special value that serves as an index for a data item.
It indicates where the data item should be be stored in the hash table.
Hash key value is generated using a hash function.
Hash Function-
Hash function is a function that maps any big number or string to a small integer
value.
Hash function takes the data item as an input and returns a small integer value as
an
output.
The small integer value is called as a hash value.
Hash value of the data item is then used as an index for storing it into the hash
table.