Questions: Hash Tables: Collision Resolution by Open Addressing

5 questions to test your understanding

Score: 0 / 5
Question 1 Multiple Choice

A hash table uses linear probing. After inserting many keys, you delete one by simply setting its slot to empty. What is the most likely consequence?

ANo consequence — the slot is now available and future insertions will work correctly
BSubsequent searches for keys that probed past this slot will terminate prematurely, failing to find them
CThe load factor drops, which improves performance
DThe next insertion at this position will automatically repair the probe sequence
Question 2 Multiple Choice

A hash table has load factor α = 0.9 using linear probing. Which adjustment would most dramatically improve lookup performance?

ASwitch to a better hash function
BResize the table to reduce α to around 0.5
CSort the stored keys so binary search can be used
DUse longer keys to reduce hash collisions
Question 3 True / False

Double hashing eliminates both primary and secondary clustering, unlike linear or quadratic probing.

TTrue
FFalse
Question 4 True / False

A well-designed hash table using open addressing can safely maintain a load factor of 0.95 without significant performance degradation.

TTrue
FFalse
Question 5 Short Answer

Why can't you simply empty a slot when deleting a key from an open-addressing hash table, and what is the standard solution?

Think about your answer, then reveal below.