Hash table

Previous: Data structure

A hash table is a data structure which utilizes a hash function to speed up lookups. There are two primary ways of building a hash table structure:

Hash functions

Perfect hashing

A perfect hash function h for a set S is a hash function that maps distinct elements in S to a set of m integers, with no collisions. In mathematical terms it is an injective function.