KMP vs naive substring search — what’s the core idea of KMP? | LetsGit.IT