In computer science, a hash table or hash map is a data structure that uses a hash function to map identifying values, known as keys, to their associated values. Thus, a hash table implements an associative array. The hash function is used to transform the key into the index (the hash) of an array element (the slot or bucket) where the corresponding value is to be sought.