Hash Function
Domain: Programming Fundamentals
π― Motivation
A hash function converts any input into a fixed-size number. Itβs the engine behind dictionaries and much more.
π Concrete Example
hash('hello') gives a number like -599545696. Same input always gives same output. Different inputs usually give different outputs.
π Analogy
A librarianβs cataloguing system - you give them a book title (input), and they compute a shelf number (hash). Same title always goes to the same shelf.