AntInLoop

Rabin–Karp String Matching Algorithm Interactive Visualizer

Rabin–Karp searches for a pattern (or multiple equal-length patterns) in a text in O(n + m) expected time by sliding a polynomial rolling hash and verifying hash matches.

Study Rabin–Karp String Matching Algorithm Explanation · View Multi-Language Code · All Algorithms