Professional Documents
Culture Documents
Dsa Hashingppt
Dsa Hashingppt
Dsa Hashingppt
• In Hashing technique, the hash table and hash function are used. Using
the hash function, we can calculate the address at which the value can
be stored.
• The main idea behind the hashing is to create the (key/value) pairs. If the
key is given, then the algorithm computes the index at which the value
would be stored. It can be written as:
Direct Address Table
• Direct Address Table is a data structure that has the capability of mapping
records to their corresponding keys using arrays. In direct address tables,
records are placed using their key values directly as indexes. They
facilitate fast searching, insertion and deletion operations.
• The range of the key determines the size of the direct address table and
may be too large to be practical. For instance, it's not likely that you'll
be able to use a direct address table to store elements which have
arbitrary 32- bit integers as their keys for
a few years yet!
• Direct addressing is easily generalized to the case where there is a
function,
Advantages:
Limitations: