<s>
In	O
computer	B-General_Concept
science	I-General_Concept
,	O
a	O
Range	B-Data_Structure
Query	I-Data_Structure
Tree	I-Data_Structure
,	O
or	O
RQT	O
,	O
is	O
a	O
term	O
for	O
referring	O
to	O
a	O
data	O
structure	O
that	O
is	O
used	O
for	O
performing	O
range	O
queries	O
and	O
updates	O
on	O
an	O
underlying	O
array	O
,	O
which	O
is	O
treated	O
as	O
the	O
leaves	O
of	O
the	O
tree	O
.	O
</s>
<s>
A	O
Range	B-Data_Structure
Query	I-Data_Structure
Tree	I-Data_Structure
uses	O
O(n )	O
storage	O
,	O
where	O
n	O
is	O
the	O
size	O
of	O
the	O
array	O
on	O
top	O
of	O
which	O
the	O
structure	O
is	O
built	O
,	O
and	O
can	O
be	O
constructed	O
in	O
O(n )	O
time	O
.	O
</s>
<s>
Range	B-Data_Structure
Query	I-Data_Structure
Trees	I-Data_Structure
support	O
performing	O
range	O
queries	O
and	O
updates	O
on	O
its	O
leaves	O
in	O
O(log n )	O
time	O
.	O
</s>
<s>
Range	B-Data_Structure
Query	I-Data_Structure
Trees	I-Data_Structure
are	O
usually	O
wrongly	O
referred	O
to	O
as	O
Segment	B-Architecture
Trees	I-Architecture
or	O
Range	B-Data_Structure
Trees	I-Data_Structure
,	O
both	O
of	O
them	O
inaccurate	O
terms	O
since	O
they	O
also	O
refer	O
to	O
other	O
already	O
existing	O
structures	O
.	O
</s>
<s>
Range	B-Data_Structure
Query	I-Data_Structure
Trees	I-Data_Structure
can	O
be	O
generalized	O
to	O
higher	O
dimension	O
spaces	O
,	O
and	O
can	O
also	O
be	O
implemented	O
with	O
two	O
Fenwick	O
Trees	O
when	O
the	O
range	O
operations	O
are	O
sums	O
.	O
</s>
<s>
A	O
Range	B-Data_Structure
Query	I-Data_Structure
Tree	I-Data_Structure
is	O
a	O
perfect	O
binary	O
tree	O
that	O
has	O
a	O
static	O
structure	O
,	O
meaning	O
that	O
its	O
content	O
can	O
be	O
changed	O
but	O
not	O
its	O
size	O
.	O
</s>
<s>
A	O
Range	B-Data_Structure
Query	I-Data_Structure
Tree	I-Data_Structure
with	O
an	O
underlying	O
array	O
of	O
size	O
n	O
(	O
padded	O
to	O
a	O
power	O
of	O
two	O
)	O
has	O
n	O
leaves	O
and	O
a	O
total	O
of	O
nodes	O
which	O
requires	O
O(n )	O
storage	O
requirement	O
.	O
</s>
