~The most beautiful data structure ;)
A hash table is a data structure that maps keys to values using a hash function to compute an index into an array of buckets or slots. The goal is to store and retrieve data efficiently, often with constant time complexity, O(1), in the average case.

Example:
If the key is "apple" and the hash function computes an index of 3, the value associated with "apple" will be stored in slot 3 of the array.
A collision occurs when the hash function generates the same index for two different keys. For example, if both "apple" and "banana" hash to index 3, a collision happens. Since two values can’t occupy the same slot, we need strategies to resolve collisions.

To deal with collisions, we use techniques like open addressing (linear probing, quadratic probing) or separate chaining. These strategies help maintain efficiency by ensuring all keys can still be stored and accessed.


