Algorithms · Strings
Reuse earlier matches to avoid repeating text comparisons.
Compare substring hashes with a pattern hash to identify candidate matches.
Compare from the pattern right edge and skip positions after mismatches.