Скоро Codeforces Round 1133 (Div. 1, Div. 2)! Регистрация здесь. ×

Shortest period of a string
Разница между en1 и en2, 325 символ(ов) изменены
Hello guys,↵
↵
Is there any way to find the shortest period of a string using Z algorithm. I know of one using KMP. ↵
↵
EDIT:↵
↵
Sorry for stating the question wrongly.↵
↵
I was solving [this](http://codeforces.me/contest/825/problem/F). So the point where i got struck was: given a string, find shortest period for each prefix. Can this be solved by Z-algorithm? And also is there a way to transform Z array to LPS array and vice-versa? ↵
↵
↵
Thanks in advance,↵
↵
Shivram↵

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en4 Английский Shivram 2017-08-15 14:15:04 157
en3 Английский Shivram 2017-08-15 13:46:18 15 Tiny change: '-algorithm? And also' -> '-algorithm in linear time? And also'
en2 Английский Shivram 2017-08-15 13:45:40 325
en1 Английский Shivram 2017-08-15 12:57:23 178 Initial revision (published)