HASHING · HASH FUNCTIONS
The arithmetic that turns a key into a table index — worked out digit by digit.
h(k) = k mod m — quotient, remainder, and why m should be prime.
h(k) = ⌊m·frac(k·A)⌋ with Knuth's golden-ratio A.
Chop long keys into digit groups, sum, then mod m.
Rolling hash: h = (h·31 + code) mod m, char by char.