Open In App

Hashing meaning in DSA

Last Updated : 13 Mar, 2023
Improve
Improve
Like Article
Like
Save
Share
Report

Hashing is defined as a data distribution technique that transforms given key into a different value using hash function for faster access to data.

Characteristics of Hashing:

  • Hashing maps the data object to exactly one memory bucket.
  • It allows uniform distribution of keys across the memory.
  • Uses different functions to perform hashing such as mid square hash function, division hash, multiplication hash
  • A hash function can be applied multiple times to get an empty Bucket.
  • There are two types static hashing and dynamic hashing. Static uses a single function for hashing while in dynamic hashing the function changes from time to time.

Applications of Hashing:

  • ISAM: IBM’s Indexed Sequential Access Method is an index based file access mechanism that uses hashing for the purpose of indexing files.
  • Hashing is used in file systems for storing files in {key, value} form.
  • Hashing is used in cybersecurity and information security for generating cryptographic information.
  • Frequency Counting of elements.

Advantages of Hashing:

  • It allows faster data access with the complexity of O(1).
  • Allows data to be mapped faster by using keys.
  • Increases performance by reducing insertion, and deletion time for data.

Disadvantages of Hashing:

  • Bucket Overflow: If the bucket storing the data is out of space then it causes an error called bucket overflow.
  • Skew: if a single bucket is selected for insertion more frequently then it is said to be skewed. This affects uniform and symmetrical distribution of data over buckets.

What else can you read?


Like Article
Suggest improvement
Previous
Next
Share your thoughts in the comments

Similar Reads