<s>
A	O
K-D	B-Application
heap	I-Application
is	O
a	O
data	B-General_Concept
structure	I-General_Concept
in	O
computer	B-General_Concept
science	I-General_Concept
which	O
implements	O
a	O
multidimensional	O
priority	B-Application
queue	I-Application
without	O
requiring	O
additional	O
space	O
.	O
</s>
<s>
It	O
is	O
a	O
generalization	O
of	O
the	O
Heap	B-Application
.	O
</s>
<s>
It	O
allows	O
for	O
efficient	O
insertion	O
,	O
query	O
of	O
the	O
minimum	O
element	O
,	O
and	O
deletion	O
of	O
the	O
minimum	O
element	O
in	O
any	O
of	O
the	O
k	O
dimensions	O
,	O
and	O
therefore	O
includes	O
the	O
double-ended	B-Application
heap	I-Application
as	O
a	O
special	O
case	O
.	O
</s>
<s>
Given	O
a	O
collection	O
of	O
n	O
items	O
,	O
where	O
each	O
has	O
keys	O
(	O
or	O
priorities	O
)	O
,	O
the	O
K-D	B-Application
heap	I-Application
organizes	O
them	O
in	O
to	O
a	O
binary	O
tree	O
which	O
satisfies	O
two	O
conditions	O
:	O
</s>
<s>
It	O
satisfies	O
k-d	B-Application
heap	I-Application
order	O
.	O
</s>
<s>
The	O
property	O
of	O
k-d	B-Application
heap	I-Application
order	O
is	O
analogous	O
to	O
that	O
of	O
the	O
heap	B-Application
property	I-Application
for	O
regular	O
heaps	B-Application
.	O
</s>
<s>
A	O
heap	B-Application
maintains	O
k-d	B-Application
heap	I-Application
order	O
if	O
:	O
</s>
<s>
Creating	O
a	O
K-D	B-Application
heap	I-Application
from	O
n	O
items	O
takes	O
O(n )	O
time	O
.	O
</s>
<s>
Importantly	O
,	O
the	O
hidden	O
constant	O
in	O
these	O
operations	O
is	O
exponentially	O
large	O
relative	O
,	O
the	O
number	O
of	O
dimensions	O
,	O
so	O
K-D	B-Application
heaps	I-Application
are	O
not	O
practical	O
for	O
applications	O
with	O
very	O
many	O
dimensions	O
.	O
</s>
