<s>
In	O
computer	B-General_Concept
science	I-General_Concept
,	O
a	O
generalized	B-Algorithm
suffix	I-Algorithm
tree	I-Algorithm
is	O
a	O
suffix	B-Architecture
tree	I-Architecture
for	O
a	O
set	O
of	O
strings	O
.	O
</s>
<s>
It	O
can	O
be	O
built	O
in	O
time	O
and	O
space	O
,	O
and	O
can	O
be	O
used	O
to	O
find	O
all	O
occurrences	O
of	O
a	O
string	O
of	O
length	O
in	O
time	O
,	O
which	O
is	O
asymptotically	B-General_Concept
optimal	I-General_Concept
(	O
assuming	O
the	O
size	O
of	O
the	O
alphabet	O
is	O
constant	O
)	O
.	O
</s>
<s>
Algorithms	O
for	O
constructing	O
a	O
GST	O
include	O
Ukkonen	B-Algorithm
's	I-Algorithm
algorithm	I-Algorithm
(	O
1995	O
)	O
and	O
McCreight	O
's	O
algorithm	O
(	O
1976	O
)	O
.	O
</s>
<s>
A	O
suffix	B-Architecture
tree	I-Architecture
for	O
the	O
strings	O
ABAB	O
and	O
BABA	O
is	O
shown	O
in	O
a	O
figure	O
above	O
.	O
</s>
<s>
An	O
alternative	O
to	O
building	O
a	O
generalized	B-Algorithm
suffix	I-Algorithm
tree	I-Algorithm
is	O
to	O
concatenate	O
the	O
strings	O
,	O
and	O
build	O
a	O
regular	O
suffix	B-Architecture
tree	I-Architecture
or	O
suffix	B-Algorithm
array	I-Algorithm
for	O
the	O
resulting	O
string	O
.	O
</s>
