Question Bank
/

String Pattern Matching

String Pattern Matching

Six deeper prompts on KMP failure functions, Rabin-Karp rolling hashes, and the naive matcher's worst case. Compares preprocessing vs search cost across the three approaches.

Question Bank
Hard
Python
kmp
rabin-karp
string-matching
algorithms

324 views

5

Compute the KMP failure function (longest proper prefix that is also a suffix) for the pattern ababcabab. Show the per-index values.

5 more questions, with full solutions and explanations, are available for premium members.

Upgrade to Premium