Hash Tables - 401-advanced-javascript-muna/amman-javascript-401d1 GitHub Wiki
Hash Tables
-
Hash - A hash is the result of some algorithm taking an incoming string and converting it into a value that could be used for either security or some other purpose. In the case of a hashtable, it is used to determine the index of the array.
-
Buckets - A bucket is what is contained in each index of the array of the hashtable. Each indicie is a bucket. An indicie could potentially contain multiple key/value pairs if a collision occurs.
-
Collisions - A collision is what happens when more than one key gets hashed to the same location of the hashtable.
Used for:
- Hold unique values
- Dictionary
- Library