[SPOJ] HELP NEEDED IN Z-ALGO

Revision en1, by i_love_emilia_clarke, 2015-10-31 21:16:09

Here is the link to the problem LINK. This is a simple string matching problem. I got AC verdict even with the brute force solution but i am getting TLE when using Z-algorithms in Python. Can anyone figure out why i am getting TLE for THIS solution.Thanks in advance

Tags z-algorithm, python, optimization, spoj, tle

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English i_love_emilia_clarke 2015-10-31 21:16:09 355 Initial revision (published)