Hashing
Turning a key into a number that tells you where to store or find something.
๐ In simple words
Turning a key into a number that tells you where to store or find something.
๐ Technical definition
Applying a hash function to a key to compute an index into a table, giving near-constant-time lookups in maps and sets.
Pseudocode example
1SET PHONE = {"Ali": "555-1234"}2DISPLAY PHONE["Ali"]
๐ Real-world analogy
A cloakroom ticket number that tells you exactly which hook holds your coat.