For example if we have our string ababaa$.

Then, we first compute the longest common prefix of $, and a$, which is 0.

Then, we compute the longest common prefix of a$ and aa$, which is a of length 1.

Then it's again a of length 1.

Then it's aba of length 3.

Then it's empty.

And then it's ba of length 2.

so the LCP array for this string is 0, 1,1, 3, 0, 2.

And the central LCP array property which will enable us to compute it fast is that

for any end assist i and j In the suffix array, where i is less than j.

The longest common prefix between A[i] and A[j] which are far from each other,

is not bigger than the LCP of i,

which is basically the longest common prefix of i and the next element.

So what I'm saying with this Lemma is that the LCP

of two neighboring elements is always at least as big

as the LCP of the first one of them with any of the next elements.

And the same goes the other way.

The LCP of two neighboring elements is at least the same

as LCP of the second of them with any of the previous ones.