What is a generalized suffix tree?

Viewed 3195

I saw the Wikipedia page but still am not clear with the idea.

To find the longest common substring of 2 strings (T and S), I've read that we must build a suffix tree for the string T($1)S($2), where`($1) and ($2) are special characters not part of the strings.

But the Wikipedia image for the strings ABAB and BABA looks like this: Generalized suffix tree

Why doesn't it contain the entire string ABAB($1)BABA($2) ? Isn't it a suffix of the concatenated string?

What are those numbers on the leaves?

1 Answers
Related