Skip to content

Files

This branch is 7 commits ahead of, 136 commits behind trekhleb/javascript-algorithms:master.

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
Dec 11, 2020
Dec 11, 2020
Aug 9, 2020
Apr 12, 2019
Aug 9, 2020
Apr 16, 2019
Mar 8, 2019
Aug 30, 2018

Hash Table

Read this in other languages: 简体中文, Русский, 日本語, Français, Português

In computing, a hash table (hash map) is a data structure which implements an associative array abstract data type, a structure that can map keys to values. A hash table uses a hash function to compute an index into an array of buckets or slots, from which the desired value can be found

Ideally, the hash function will assign each key to a unique bucket, but most hash table designs employ an imperfect hash function, which might cause hash collisions where the hash function generates the same index for more than one key. Such collisions must be accommodated in some way.

Hash Table

Hash collision resolved by separate chaining.

Hash Collision

References