191k views
4 votes
What is a perfect hashing function?

User Netwer
by
6.7k points

1 Answer

3 votes

Answer:

First we understand what is hash function.A hash function is mostly used in Hashmaps. It maps different keys to a set of values.There may occur a case when we have same key but different values.This case is called collision.So we have to use different collision handling techniques that are open addressing and separate chaining.

A perfect hash function maps key-value pair such that there are no collisions.

User Nathan Anderson
by
6.4k points