Hash Table Representation
(a) Hash Function
Hash Table Representation:
Dictionaries
Representation of Dictionaries:
1. Linear List Representation
2. Hash Table Representation
(a) Hash Function
Hash Table Representation:
Hash table is
a data structure
used for storing
and retrieving the
data very quickly.Insertion of
the data in
the hash table
is based on the
key value.Hence every
entry in the
hash table is
associated with some
key.
Example:
For
storing the employee
record in the
hash table the
employee id will work as a
key.
Ø Using the
hash key the
required piece of
data can be
searched in the hash
table by few
or more key
comparisons. The searching
time is
then dependent upon
the size of
the hash table.
Ø The effective
representation of a key can be
done using hash
table.We can place
the dictionary entries(key,value)in the hash
table using hash
function.
Dictionaries
Representation of Dictionaries:
1. Linear List Representation
2. Hash Table Representation
No comments:
Post a Comment