AA-VIZ /

Rabin-Karp

Interactive visualizations for Chapter 1 of the Advanced Algorithms notes

Effect of q on Spurious Hits

The bar chart below compares four values of q on the same input. Small q → many spurious hits (red bars). Large prime q → almost none.