Hash Functions
The lesson elaborates on Hash functions and how they work.
We'll cover the following...
🔍 Hash Function?
A hash function simply takes a
keyof an item and returns a calculatedindexin the array for that item.
This index calculation can be a simple or a very complicated encryption method. However, it is very important to choose an efficient Hashing function, as it directly affects the performance of the Hashing mechanism.
What Hash Functions Do?
Have a look at the following illustration to get the analogy of a Hash function.
We can consider the Hash function as a method that takes key as an input and returns the corresponding index to that key.
Commonly Used Hash Functions
These are the most common hashing functions in use:
- 
Arithmetic ModularTake mod of the key with the size of an array (called table)
...
 Ask