String Matching Algorithms
When to Use
- Naive: short patterns (m small), large alphabet, or one-off search; no setup cost
- KMP: guaranteed O(n+m), single pattern, repetitive pattern structure (e.g., ATATATG), streaming input
- Rabin-Karp: multiple patterns of same length (hash all, scan once), plagiarism/duplicate detection
- DFA: small fixed alphabet (DNA: |Σ|=4), many texts with the same pattern, need O(1) per character with no backtracking
Quick Reference
Com
[Description truncada. Veja o README completo no GitHub.]