How does a hash table work

712 views

How does a hash table work

In: Technology

3 Answers

Anonymous 0 Comments

I will assume you know hash functions and general data storage

It’s a storage structure of key/value pairs where the key is always the hash of the value you’re storing. This allows storing a lot of very different datapoints in the same table and also efficiently finding your data (just calculate the hash and look for that cell)

Since hashes are not unique you’ll have to decide on a strategy when you have a collision. For example you can use a linked list in that case wich will add a bit of hassle finding the data you want inside that list.

You are viewing 1 out of 3 answers, click here to view all answers.