Hash Functions
A hash function maps a key to an integer. For a string, it reads the characters. A usable function spreads similar keys into different slots.
Costs
| Category | Algorithm |
| Difficulty | Medium |
| Hash a string of length k | O(k) |
| Same key | same slot |
| A collision | two keys, one slot |
Questions
What is Hash Functions?
A hash function maps a key to an integer. For a string, it reads the characters. A usable function spreads similar keys into different slots.
Where do I practice it?
DSA Master keeps challenges and progress on the phone. This page is the idea and the costs.