Implement KMP and Rabin-Karp Search
failure function and rolling hash
Challenge 5 of Arrays & StringsAdvanced~60 minFree
Build the substring-search toolkit that powers grep, DNA sequence search, and plagiarism detection. Start with brute force, then implement the KMP failure function and linear-time scan, add a Rabin-Karp rolling hash, and finish with hash-based repeated-substring detection.