Questions: Hash Tables

3 questions to test your understanding

Score: 0 / 3
Question 1 Multiple Choice

A hash table has 10 slots and currently holds 9 items (load factor = 0.9). What is the most accurate characterization of its performance risk?

AO(1) is still guaranteed because the hash function is deterministic
BThe high load factor increases collision probability, risking O(n) operations if collisions cluster
CPerformance is unaffected; only the hash function quality matters, not the load factor
DThe table must immediately resize or all insert operations will fail
Question 2 True / False

Hash tables generally preserve the insertion order of keys.

TTrue
FFalse
Question 3 Short Answer

Why is worst-case O(n) lookup possible in a hash table even when the hash function is perfectly uniform on average?

Think about your answer, then reveal below.