🎉 October Learning Month — learn a new software term every day!
An interactive flashcard trainer for software engineering terms.

Rabin Karp

In plain terms

A string-search algorithm using rolling hashes.

Going deeper

Rabin-Karp hashes the pattern and each text window, comparing hashes to find matches quickly and confirming on hash hits. Rolling hashes make window updates cheap.

Under the hood

Average O(n+m); excels at multi-pattern search but needs collision handling to avoid false positives.

Examples

Plagiarism detection, multi-pattern search, substring matching, Rabin fingerprints.

Think of it like...

Like comparing document fingerprints instead of reading every word to spot a match.

Feedback & Bug Report