Mental Model
We use a number to represent a string part and slide over the text, quickly checking if parts match by comparing numbers first.
Analogy: Imagine checking if a small picture is inside a big picture by comparing a simple color code instead of every pixel, then confirming only if codes match.
Text: T -> h -> i -> s -> -> i -> s -> -> a -> -> t -> e -> x -> t -> null Pattern: P -> a -> t -> t -> e -> r -> n -> null Hash window: [T h i s] -> slide right -> [h i s ] -> ... ā current hash window
