LCP array: Difference between revisions

Content deleted Content added
Citation bot (talk | contribs)
Add: s2cid. Removed parameters. | Use this bot. Report bugs. | Suggested by Abductive | via #UCB_webform 436/771
Tags: Mobile edit Mobile web edit Advanced mobile edit
Line 45:
 
== Example ==
Consider the string <math>S = \textrm{banana\$}</math>:
 
{| class="wikitable"
Line 107:
|}
 
So, for example, <math>H[3]=3</math> is the length of the longest common prefix <math>\text{ana}</math> shared by the suffixes <math> A[3] = S[4,7] = \textrm{ana\$} </math> and <math>A[4] = S[2,7] = \textrm{anana\$}</math>. Note that <math>H[1]</math> is undefined, since there is no lexicographically smaller suffix.
 
== Efficient construction algorithms ==