Slide a window of length m over text; recompute hash in O(1) per step by subtracting the outgoing character and adding the incoming one. Compare hashes first; verify character-by-character only on hash match. LC 28, 187, 1044, 2156.