Need for Hash data structure
Every day, the data on the internet is increasing multifold and it is always a struggle to store this data efficiently. In day-to-day programming, this amount of data might not be that big, but still, it needs to be stored, accessed, and processed easily and efficiently. A very common data structure that is used for such a purpose is the Array data structure.
Now the question arises if Array was already there, what was the need for a new data structure! The answer to this is in the word “efficiency“. Though storing in Array takes O(1) time, searching in it takes at least O(log n) time. This time appears to be small, but for a large data set, it can cause a lot of problems and this, in turn, makes the Array data structure inefficient.
So now we are looking for a data structure that can store the data and search in it in constant time, i.e. in O(1) time. This is how Hashing data structure came into play. With the introduction of the Hash data structure, it is now possible to easily store data in constant time and retrieve them in constant time as well.
Hashing Notes for GATE Exam [2024]
Hashing is a fundamental concept in computer science and plays a pivotal role in various algorithms and data structures. Aspiring candidates preparing for the GATE Exam 2024 must grasp the intricacies of hashing to tackle complex problem-solving scenarios efficiently. These notes aim to provide a concise yet comprehensive overview of hashing, covering essential concepts that are likely to be tested in the GATE examination.
Table of Content
- Introduction to Hashing
- Need for Hash data structure
- Components of Hashing
- How does Hashing work?
- What is a Hash function?
- Problem with Hashing
- What is collision?
- How to handle Collisions?
- Separate Chaining
- Open Addressing
- What is meant by Load Factor in Hashing?
- What is Rehashing?
- Applications of Hash Data structure
- Real-Time Applications of Hash Data structure
- Advantages of Hash Data structure
- Disadvantages of Hash Data structure
- MCQ of Hashing