What is Rehashing?
As the name suggests, rehashing means hashing again. Basically, when the load factor increases to more than its predefined value (the default value of the load factor is 0.75), the complexity increases. So to overcome this, the size of the array is increased (doubled) and all the values are hashed again and stored in the new double-sized array to maintain a low load factor and low complexity.
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