Suffix Array LCP problem

Revision en1, by rogue1, 2017-07-29 02:39:58

Hello,
I was trying to solve SPOJ Distinct Substrings (DISUBSTR) using this algorithm. However, the lcp is not correct for the string "CCCCC". (see here)
Can anyone tell me why the lcp in output line 4 is 0? Thanks.

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English rogue1 2017-07-29 02:39:58 336 Initial revision (published)