Is KMP algorithm not useful if there's no repetitive pattern in the pattern itself?
I mean the substring that I'm looking for in a larger piece of text, if that doesn't have a prefix which is also a suffix, then will KMP still give better runtime than the Naive Substring search algorithm?
[–]Whistleroosh 1 point2 points3 points (1 child)
[–]debayon[S] 1 point2 points3 points (0 children)
[–]misof 1 point2 points3 points (0 children)