hagu's blog

By hagu, 10 years ago, In English

I was wondering if the Z value (LCP(0,i)) array of Z-Algorithm can be computed using KMP.
I need it for this problem :- http://www.spoj.com/problems/PRETILE/

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

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

They are. Here I described an algorithm (unfortunately it's Russian only). But it is way harder than computing KMP array from Z value or Z value from Z algorithm.