Implement the Knuth-Morris-Pratt (KMP) String Searching Algorithm.
HardProblem Statement
Implement the Knuth-Morris-Pratt (KMP) String Searching Algorithm.
Sample Input
Search "abc" in "ababcabc"
Sample Output
2
Limits
Time: 2s · Memory: 256 MB
Implement the Knuth-Morris-Pratt (KMP) String Searching Algorithm.
Search "abc" in "ababcabc"
2
Time: 2s · Memory: 256 MB