The important thing is that you shouldn't store edges as substrings.

So what corresponds in the suffix tree to the suffix array elements?

Let's take the first element of the suffix array.

Actually, it is corresponding to suffix in the string S and

that is corresponding to a leaf in the suffix tree and also to the path

from a root vertex to the corresponding leaf vertex in the tree.

So the first element of the suffix array corresponds to this route

highlighted in blue, and then if we go to the next element of the suffix array,

we get another route from route vertex to the leaf number 1.

And then if we go to the next element,

we get route from the route vertex to the leaf number 2.

And note that the indexes of the leaves, and

the indexes of the suffixes are just in the sorted order.

So, those are not positions in the string S.

Those are numbers of the suffixes in the increasing order,

from 0 to number of the suffixes minus 1.

So, each of the elements of the suffix array corresponds to some

path from root to leaf in the suffix tree, that is what we know.

That is unfortunately not yet sufficient to build the tree from the suffix array

because there are many ways to create some paths from root to different nodes.

Which corresponds to suffixes of the suffix array.

So we will need some additional properties.

And this additional property we will need is call longest common prefix, or

often it is just said as lcp.