<s>
The	O
Ruzzo	B-Algorithm
–	I-Algorithm
Tompa	I-Algorithm
algorithm	I-Algorithm
or	O
the	O
RT	O
algorithm	O
is	O
a	O
linear-time	O
algorithm	O
for	O
finding	O
all	O
non-overlapping	O
,	O
contiguous	O
,	O
maximal	O
scoring	O
subsequences	O
in	O
a	O
sequence	O
of	O
real	O
numbers	O
.	O
</s>
<s>
The	O
Ruzzo	B-Algorithm
–	I-Algorithm
Tompa	I-Algorithm
algorithm	I-Algorithm
was	O
proposed	O
by	O
Walter	O
L	O
.	O
Ruzzo	O
and	O
Martin	O
Tompa	O
.	O
</s>
<s>
The	O
maximum	O
scoring	O
subsequence	O
from	O
the	O
set	O
produced	O
by	O
the	O
algorithm	O
is	O
also	O
a	O
solution	O
to	O
the	O
maximum	B-Language
subarray	I-Language
problem	I-Language
.	O
</s>
<s>
The	O
Ruzzo	B-Algorithm
–	I-Algorithm
Tompa	I-Algorithm
algorithm	I-Algorithm
has	O
applications	O
in	O
bioinformatics	O
,	O
web	B-Application
scraping	I-Application
,	O
and	O
information	B-Library
retrieval	I-Library
.	O
</s>
<s>
The	O
Ruzzo	B-Algorithm
–	I-Algorithm
Tompa	I-Algorithm
algorithm	I-Algorithm
has	O
been	O
used	O
in	O
Bioinformatics	O
tools	O
to	O
study	O
biological	O
data	O
.	O
</s>
<s>
The	O
algorithm	O
is	O
used	O
in	O
sequence	B-Algorithm
alignment	I-Algorithm
which	O
is	O
used	O
as	O
a	O
method	O
of	O
identifying	O
similar	O
DNA	O
,	O
RNA	O
,	O
or	O
protein	O
sequences	O
.	O
</s>
<s>
Accounting	O
for	O
the	O
ordering	O
of	O
pairs	O
of	O
high-scoring	O
subsequences	O
in	O
two	O
sequences	O
creates	O
better	O
sequence	B-Algorithm
alignments	I-Algorithm
.	O
</s>
<s>
The	O
Ruzzo	B-Algorithm
–	I-Algorithm
Tompa	I-Algorithm
algorithm	I-Algorithm
is	O
used	O
in	O
Web	B-Application
scraping	I-Application
to	O
extract	O
information	O
from	O
web	O
pages	O
.	O
</s>
<s>
A	O
modified	O
version	O
of	O
the	O
Ruzzo	B-Algorithm
–	I-Algorithm
Tompa	I-Algorithm
algorithm	I-Algorithm
is	O
then	O
used	O
to	O
find	O
the	O
k	O
highest-valued	O
subsequences	O
of	O
tokens	O
.	O
</s>
<s>
The	O
Ruzzo	B-Algorithm
–	I-Algorithm
Tompa	I-Algorithm
algorithm	I-Algorithm
has	O
been	O
used	O
in	O
Information	B-Library
retrieval	I-Library
search	O
algorithms	O
.	O
</s>
<s>
proposed	O
a	O
data	B-General_Concept
fusion	I-General_Concept
method	O
to	O
combine	O
the	O
search	O
results	O
of	O
several	O
microblog	O
search	O
algorithms	O
.	O
</s>
<s>
In	O
their	O
method	O
,	O
the	O
Ruzzo	B-Algorithm
–	I-Algorithm
Tompa	I-Algorithm
algorithm	I-Algorithm
is	O
used	O
to	O
detect	O
bursts	B-Algorithm
of	O
information	O
.	O
</s>
<s>
A	O
natural	O
approach	O
is	O
to	O
use	O
existing	O
,	O
linear	O
time	O
algorithms	O
to	O
find	O
the	O
maximum	O
subsequence	O
(	O
see	O
maximum	B-Language
subarray	I-Language
problem	I-Language
)	O
and	O
then	O
recursively	O
find	O
the	O
maximal	O
subsequences	O
to	O
the	O
left	O
and	O
right	O
of	O
the	O
maximum	O
subsequence	O
.	O
</s>
<s>
The	O
analysis	O
of	O
this	O
algorithm	O
is	O
similar	O
to	O
that	O
of	O
Quicksort	B-Algorithm
:	O
The	O
maximum	O
subsequence	O
could	O
be	O
small	O
in	O
comparison	O
to	O
the	O
rest	O
of	O
sequence	O
,	O
leading	O
to	O
a	O
running	O
time	O
of	O
in	O
the	O
worst	O
case	O
.	O
</s>
<s>
The	O
standard	O
implementation	O
of	O
the	O
Ruzzo	B-Algorithm
–	I-Algorithm
Tompa	I-Algorithm
algorithm	I-Algorithm
runs	O
in	O
time	O
and	O
uses	O
O(n )	O
space	O
,	O
where	O
n	O
is	O
the	O
length	O
of	O
the	O
list	O
of	O
scores	O
.	O
</s>
<s>
The	O
algorithm	O
uses	O
dynamic	B-Algorithm
programming	I-Algorithm
to	O
progressively	O
build	O
the	O
final	O
solution	O
by	O
incrementally	O
solving	O
progressively	O
larger	O
subsets	O
of	O
the	O
problem	O
.	O
</s>
<s>
The	O
following	O
Python	B-Language
code	I-Language
implements	O
the	O
Ruzzo	B-Algorithm
–	I-Algorithm
Tompa	I-Algorithm
algorithm	I-Algorithm
:	O
</s>
