reading-notes-ma


Project maintained by mohnalkhateeb Hosted on GitHub Pages — Theme by mattgraham

Hashtables

What is a Hashtable?

Why do we use them?

What Are they?

Structure

Hashing

Creating a Hash

Collisions

A collision occurs when more than one key hashes to the same index in an array. As mentioned earlier, a “perfect hash” will never have any collisions. To put this into perspective, the worst possible hash is one that hashes every single key to the same exact index of an array. The more keys you have hashed to a specific index, the more key/value pair combos you can potentially have.

collision

Bucket Sizes

Internal Methods