Guided lesson

Rabin-Karp

Strings

See the input

Intermediate

Input for Rabin-Karp: Compare rolling hashes of fixed-size windows against the pattern hash.

ABABCAB
pattern position: 0 - reuse what already matched
Step 1 Average O(n + m) time - O(1) space
Guided progression
6% lesson
Step 1 / 2Learner goal
Speech settings Speed 1.0 · Volume 90%

Keyboard: Space play/pause · Arrow keys step · Page Up/Down change sections · R restart