Mental Model
We use a number to represent a string and compare these numbers to find matches quickly.
Analogy: Imagine checking if a small book page is inside a big book by comparing page numbers instead of reading every word each time.
Text: T h i s i s a t e x t Pattern: i s a Hash: [hash of 'i s a'] Positions: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14
