Recall & Review
beginner
What is collision handling in open addressing?
Collision handling in open addressing is a method to resolve conflicts when two keys hash to the same index by finding another open slot within the hash table itself.
Click to reveal answer
beginner
Name three common probing techniques used in open addressing.
The three common probing techniques are linear probing, quadratic probing, and double hashing.
Click to reveal answer
beginner
How does linear probing work in open addressing?
Linear probing checks the next slot sequentially (index + 1, index + 2, etc.) until it finds an empty slot to place the new key.
Click to reveal answer
intermediate
What problem can occur with linear probing and how is it called?
Linear probing can cause clustering, where groups of filled slots form, increasing search time. This is called primary clustering.
Click to reveal answer
intermediate
Explain double hashing in open addressing.
Double hashing uses a second hash function to calculate the step size for probing, reducing clustering by spreading out keys more evenly.
Click to reveal answer
What does open addressing do when a collision occurs?
✗ Incorrect
Open addressing resolves collisions by searching for another empty slot within the hash table.
Which probing method checks slots sequentially after a collision?
✗ Incorrect
Linear probing checks the next slots one by one in order.
What is the main disadvantage of linear probing?
✗ Incorrect
Linear probing can cause primary clustering, where filled slots group together and slow down operations.
Which technique uses a second hash function to find the next slot?
✗ Incorrect
Double hashing uses a second hash function to calculate the step size for probing.
In open addressing, what happens if the table is full?
✗ Incorrect
If the hash table is full, open addressing cannot insert new keys because no empty slots remain.
Describe how open addressing handles collisions in a hash table.
Think about how the table itself is used to resolve conflicts.
You got /3 concepts.
Compare linear probing and double hashing as collision handling methods.
Focus on how they find the next slot and their impact on clustering.
You got /3 concepts.