0
0
Data Structures Theoryknowledge~5 mins

Collision handling (open addressing) in Data Structures Theory - Cheat Sheet & Quick Revision

Choose your learning style9 modes available
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?
AFinds another empty slot in the hash table
BStores the key in a linked list
CDeletes the existing key
DIgnores the new key
Which probing method checks slots sequentially after a collision?
ALinear probing
BDouble hashing
CQuadratic probing
DSeparate chaining
What is the main disadvantage of linear probing?
ASlow hash function
BSecondary clustering
CHigh memory usage
DPrimary clustering
Which technique uses a second hash function to find the next slot?
AQuadratic probing
BLinear probing
CDouble hashing
DSeparate chaining
In open addressing, what happens if the table is full?
AKeys are stored outside the table
BInsertion fails because no empty slot is available
CThe table automatically expands
DOld keys are overwritten
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.