Well, we do not know, because there is no corresponding k element,

let's say, for a2na.

How do we find where it appears?

Indeed, we don't know yet where it appears, but we can also

ask a question where is b1 a n a appears.

Once again, we don't know how to answer this question because there is

corresponding [INAUDIBLE] in the partial suffix.

But, using the first last part of it we can ask different question.

Where is the string a 1 b ana appears?

And now we can answer this question.

Because in this case, the element of the partial suffix array is Present.

It is fast.

So, we know where there is a1bana appears,

now the thing left is to figure out where ana appears.

And it's easy to do because if aabana appears at position 5,

then b1ana appears at position 6.

And ana appears at position 7, so

we figure out how to use suffix array for fast pattern matching.

Of course, the time to search for pattern will be multiplied by a factor of k,

because if you store, we potentially can search for

up to k position before you find the fill element of the partial suffix array,

but K is a constant in this algorithm.