Mental Model
We use a number to represent a string and slide over the text to find matches quickly by comparing these numbers instead of characters.
Analogy: Imagine checking if a small picture appears inside a big picture by comparing their color codes instead of looking at every pixel one by one.
Text: T -> h -> i -> s -> -> i -> s -> -> a -> -> t -> e -> x -> t -> null Pattern: P -> a -> t -> t -> e -> r -> n -> null Hash: [hash of pattern] and sliding hash over text positions
