Skip to main contentSkip to solution

If a hash function is perfect, collision will _________ occur.

Solution

✅ Correct Option: 4

A perfect hash function maps every distinct key to a distinct slot, so no two keys share the same hash value. Collisions therefore never occur.


Option 2: this describes an ordinary hash function, where collisions are possible and must be handled by chaining or open addressing.

Perfect hashing works 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