Name two common collision resolution strategies in hashing.

Prepare for the GATE General Aptitude and CS Test. Enhance your skills with multiple choice questions and detailed explanations. Elevate your readiness and boost your confidence for the exam!

Multiple Choice

Name two common collision resolution strategies in hashing.

Explanation:
Collision resolution in hashing is about what you do when two keys end up in the same slot after hashing. The two most common strategies are open addressing and separate chaining. Open addressing keeps every element inside the hash table itself by probing for another available slot in the table when a collision occurs. The probe can follow patterns like linear, quadratic, or double hashing to find the next free position. Separate chaining handles collisions by allowing multiple keys to share the same bucket, typically by storing them in a secondary structure linked to that bucket (often a linked list). The other ideas describe different concepts: linear search and binary search are general search techniques, not how to resolve collisions in hashing; depth-first and breadth-first are graph traversal methods; hashing and modulo operation refer to creating the hash value itself, not the resolution of collisions.

Collision resolution in hashing is about what you do when two keys end up in the same slot after hashing. The two most common strategies are open addressing and separate chaining.

Open addressing keeps every element inside the hash table itself by probing for another available slot in the table when a collision occurs. The probe can follow patterns like linear, quadratic, or double hashing to find the next free position.

Separate chaining handles collisions by allowing multiple keys to share the same bucket, typically by storing them in a secondary structure linked to that bucket (often a linked list).

The other ideas describe different concepts: linear search and binary search are general search techniques, not how to resolve collisions in hashing; depth-first and breadth-first are graph traversal methods; hashing and modulo operation refer to creating the hash value itself, not the resolution of collisions.

Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy