DSAverse
String Algorithms
Loading String Algorithms...
Pattern Matching
A
B
A
B
C
A
B
A
B
A
B
A
B
text / pattern
Initializing Sorting Algorithms...
Sorting
Trees
Graphs
Preparing interactive visualizations...
String Algorithms
Loading String Algorithms...
Pattern Matching
text / pattern
Uses a rolling hash to slide a window across the text in O(1) per step. Hash matches trigger full verification; hash mismatches skip comparison entirely.
An interactive step-by-step visualization for Rabin-Karp is currently being built. You will be able to watch the rolling hash update as the window slides, and see hash collisions trigger character-by-character checks.
Back to String Algorithms