Computer scienceAlgorithms and Data StructuresAlgorithmsString algorithmsSubstring search algorithms

Knuth-Morris-Pratt algorithm

Think big

Report a typo

Tired of the meaningless ABCABC strings in the theory? Let's see if you can come up with cooler ones.

Your task is to think of a pattern ss and a string tt, such that the KMP algorithm finds the presence of ss in tt exactly after 55 shifts. Write each string on a new line.

Answer example:

PATTERN
STRINGWITHPATTERNINSIDE
Enter a short text
___

Create a free account to access the full topic