Read a string as a number in base b, mod p. Prefix hashes give any substring’s hash in O(1), a window rolls in O(1), and a small p shows collisions you can see.
This interactive visualization needs JavaScript.