Practice mode Data Structures

How does separate chaining resolve collisions in a hash table?

Correct answer B. Each slot holds a linked list of all keys that hash to it

Explanation

In separate chaining each bucket points to a list, and every key that hashes to that bucket is added to the list. Search hashes to the bucket and scans only its short list. Moving to the next empty slot is linear probing and using a second hash function is double hashing, both forms of open addressing, where all keys live in the array itself.

Report a problem

Answer checked How we write and check questions

Tip: press A, B, C or D to answer, and N for the next question.

Advertisement

Have a question about this answer?

Your email address will not be published. Required fields are marked *

Links and website addresses are not allowed in comments.