Rabin-Karp
Finds every place a pattern stands in a text by comparing numbers before letters. Each piece of text as long as the pattern gets a fingerprint, a number from 0 to 10. Only where it agrees with the pattern's are the letters compared, and each fingerprint comes cheaply from the one before.
the text, with the pattern under it
the fingerprint of the text under the pattern at each place
- letters compared
- 0
- fingerprints worked out
- 0
step 1 of 1
Examples