Medium

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

CategoryAlgorithm
DifficultyMedium
Hash a string of length kO(k)
Same keysame slot
A collisiontwo 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.