Hash Table Visualization

code snippet
Hash function

The index for a specific string will be equal to sum of ASCII values of characters multiplied by their respective order in the string after which it is modulo with size of hash table (prime number)
hash(abcdef) = (97*1 + 98*2 + 99*3 + 100*4 + 101*5 + 102*6) % size of table
* collision resolution: separate chaining

error image

cross icon