<s>
In	O
computer	B-General_Concept
science	I-General_Concept
,	O
an	O
order	B-Algorithm
statistic	I-Algorithm
tree	I-Algorithm
is	O
a	O
variant	O
of	O
the	O
binary	B-Language
search	I-Language
tree	I-Language
(	O
or	O
more	O
generally	O
,	O
a	O
B-tree	B-Architecture
)	O
that	O
supports	O
two	O
additional	O
operations	O
beyond	O
insertion	O
,	O
lookup	O
and	O
deletion	O
:	O
</s>
<s>
Both	O
operations	O
can	O
be	O
performed	O
in	O
worst	B-General_Concept
case	I-General_Concept
time	O
when	O
a	O
self-balancing	B-Data_Structure
tree	I-Data_Structure
is	O
used	O
as	O
the	O
base	O
data	O
structure	O
.	O
</s>
<s>
To	O
turn	O
a	O
regular	O
search	O
tree	O
into	O
an	O
order	B-Algorithm
statistic	I-Algorithm
tree	I-Algorithm
,	O
the	O
nodes	O
of	O
the	O
tree	O
need	O
to	O
store	O
one	O
additional	O
value	O
,	O
which	O
is	O
the	O
size	O
of	O
the	O
subtree	O
rooted	O
at	O
that	O
node	O
(	O
i.e.	O
,	O
the	O
number	O
of	O
nodes	O
below	O
it	O
)	O
.	O
</s>
<s>
Order-statistic	O
trees	O
can	O
be	O
further	O
amended	O
with	O
bookkeeping	O
information	O
to	O
maintain	O
balance	O
(	O
e.g.	O
,	O
tree	O
height	O
can	O
be	O
added	O
to	O
get	O
an	O
order	O
statistic	O
AVL	O
tree	O
,	O
or	O
a	O
color	O
bit	O
to	O
get	O
a	O
red	O
–	O
black	O
order	B-Algorithm
statistic	I-Algorithm
tree	I-Algorithm
)	O
.	O
</s>
<s>
Alternatively	O
,	O
the	O
size	O
field	O
can	O
be	O
used	O
in	O
conjunction	O
with	O
a	O
weight-balancing	B-Data_Structure
scheme	O
at	O
no	O
additional	O
storage	O
cost	O
.	O
</s>
