HashTable - JamesDansie/data-structures-and-algorithms GitHub Wiki
Hash Table
Author: James Dansie
A hash table is kind of like a hash map. It maps data, but not directly based on the key anymore. Instead it passes the key through a hash code to make an index, and then stores the data at that index. This allows for faster lookup (unlike an array that would have to go through the entire array to compare to see if the value is stored).
The hard part for a hash table is minimizing collisions. Whenever multiple data is stored at the same index, the index can be a linked list that grows as more data is added. However, this makes the process slower and less efficient. In order to minimize collisions a good hashing code should have uniform distribution.