Skip to main contentSkip to solution

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.

Keyboard Shortcuts

  • Left arrow: Previous question
  • Right arrow: Next question
  • S key: Jump to solution
  • Q key: Jump to question