siddv's blog

By siddv, 10 years ago, In English

Hi Guys,

I am trying to understand the editorial for this problem on prefix and suffix. The editorial is not very clear OR maybe it is clear and I am not able to understand it. What is prefix function p of string s ? It will be great if someone can explain the approach with an example.

  • Vote: I like it
  • 0
  • Vote: I do not like it

»
10 years ago, # |
  Vote: I like it 0 Vote: I do not like it

Ok I found some blog on Z algorithm at http://mirror.codeforces.com/blog/entry/3107.