Polynomial rolling hash mod 1000003 with base 257:
- precompute base^(m-1)
- slide window updating hash in O(1) per step
- verify hash match with O(m) memcmp to skip false positives
rolling_match "abcabcabcabcabcabc" "abc" = 6
Six non-overlapping copies of "abc" at positions 0,3,6,9,12,15.
Tests `for _ = 0 to m - 2 do … done` unused loop variable
(uses underscore wildcard pattern), Char.code arithmetic, mod
arithmetic with intermediate negative subtractions, complex nested
if/begin branching with inner break-via-flag.
151 baseline programs total.