Day 27 — Advanced Strings
This chapter is being written. Check back soon!
What you’ll learn here
- KMP (Knuth-Morris-Pratt) — the failure function and why pattern matching can run in O(n + m)
- Rabin-Karp — rolling hash for pattern matching and detecting duplicate substrings
- Z-algorithm — another linear-time string matcher with a simpler proof
- Suffix arrays and tries on suffixes — when you have one big string and many queries
Day 2’s String Algorithms covered the naive matcher and gave you a taste of KMP and Rabin-Karp. This chapter goes deep into the theory and applications.