Find all start indices where pattern occurs in text using Rabin-Karp: compare rolling polynomial hashes (base 256, modulus 1_000_000_007) and confirm candidate matches with a direct comparison (so hash collisions never produce false positives).
Also implement has_repeat(text, k): return True if any substring of length k occurs at least twice, using the same rolling hash and a dictionary of hash → start positions.