reading-notes


Project maintained by mr-atta Hosted on GitHub Pages — Theme by mattgraham

Hash Tables


<hr>

Resources

Hash Tables


<hr>

What is a Hashtable ❓

Hashtables are a data structure that utilize key value pairs. This means every Node or Bucket has both a key, and a value.

a structure that can map keys to values. A hash table uses a hash function to compute an index, also called a hash code, into an array of buckets or slots, from which the desired value can be found.

Why do we use it ❓


Hashing is implemented in two steps:

  1. An element is converted into an integer by using a hash function. This element can be used as an index to store the original element, which falls into the hash table.
  2. The element is stored in the hash table where it can be quickly retrieved using hashed key.

    • hash = hashfunc(key)
    • index = hash % array_size

Hash function

A hash function is any function that can be used to map a data set of an arbitrary size to a data set of a fixed size, which falls into the hash table. The values returned by a hash function are called hash values, hash codes, hash sums, or simply hashes.


<hr>

📁 Intro to Hash Tables

🎥 what is a hash table?

📁 basics of hash tables

📁