Prefix Function
Problems on the prefix function, including the Knuth-Morris-Pratt substring search, the period of a string, counting occurrences of each prefix, the shortest string that generates a given one, and automata for pattern matching.
Related problem sets are under Z-function, Strings and Hashing.
Problems
Satellite#467
Medium
KMP#1498
Medium
Period of words#2882
Medium
Period#3345
Medium
Compression#3880
Medium
Number of pairs#5947
Very hard
Dragon Pattern#6175
Very hard
Eating Brains#6696
Very hard
Musical Plagiarism#6932
Medium
The ABCD Murderer#9747
Very hard
K==S#9766
Very hard
Passwords#11041
Easy