If every item of the list maps to a unique index in the hash table, the hash function is called a ____________ hash function.
If every item of the list maps to a unique index in the hash table, the hash function is called a ____________ hash function.
Solution
✅ Correct Option: 1
A perfect hash function maps every item to a unique index in the hash table, so no two items share a slot and no collisions occur.
Option 2: the remainder (division) method is just one way of computing a hash value, and it does not guarantee unique indices.
Option 3: a collision is the opposite situation, where two different items map to the same index.
A perfect hash function is possible only when the set of keys is known in advance.
Related questions:
2026: 26 May Shift 1
2026: 20 May Shift 1
2026: 29 May Shift 1
2026: 18 May Shift 2