<s>
In	O
computer	B-General_Concept
science	I-General_Concept
,	O
a	O
hashed	B-Data_Structure
array	I-Data_Structure
tree	I-Data_Structure
(	O
HAT	O
)	O
is	O
a	O
dynamic	B-Data_Structure
array	I-Data_Structure
data-structure	O
published	O
by	O
Edward	O
Sitarski	O
in	O
1996	O
,	O
maintaining	O
an	O
array	B-Data_Structure
of	O
separate	O
memory	O
fragments	O
(	O
or	O
"	O
leaves	O
"	O
)	O
to	O
store	O
the	O
data	O
elements	O
,	O
unlike	O
simple	O
dynamic	B-Data_Structure
arrays	I-Data_Structure
which	O
maintain	O
their	O
data	O
in	O
one	O
contiguous	O
memory	O
area	O
.	O
</s>
<s>
Its	O
primary	O
objective	O
is	O
to	O
reduce	O
the	O
amount	O
of	O
element	O
copying	O
due	O
to	O
automatic	O
array	B-Data_Structure
resizing	O
operations	O
,	O
and	O
to	O
improve	O
memory	O
usage	O
patterns	O
.	O
</s>
<s>
Whereas	O
simple	O
dynamic	B-Data_Structure
arrays	I-Data_Structure
based	O
on	O
geometric	O
expansion	O
waste	O
linear	O
(Ω(n )	O
)	O
space	O
,	O
where	O
n	O
is	O
the	O
number	O
of	O
elements	O
in	O
the	O
array	B-Data_Structure
,	O
hashed	B-Data_Structure
array	I-Data_Structure
trees	I-Data_Structure
waste	O
only	O
order	O
O( )	O
storage	O
space	O
.	O
</s>
<s>
It	O
can	O
perform	O
access	B-General_Concept
in	O
constant	O
(O(1 )	O
)	O
time	O
,	O
though	O
slightly	O
slower	O
than	O
simple	O
dynamic	B-Data_Structure
arrays	I-Data_Structure
.	O
</s>
<s>
The	O
algorithm	O
has	O
O(1 )	O
amortized	O
performance	O
when	O
appending	O
a	O
series	O
of	O
objects	O
to	O
the	O
end	O
of	O
a	O
hashed	B-Data_Structure
array	I-Data_Structure
tree	I-Data_Structure
.	O
</s>
<s>
Contrary	O
to	O
its	O
name	O
,	O
it	O
does	O
not	O
use	O
hash	B-Error_Name
functions	I-Error_Name
.	O
</s>
<s>
As	O
defined	O
by	O
Sitarski	O
,	O
a	O
hashed	B-Data_Structure
array	I-Data_Structure
tree	I-Data_Structure
has	O
a	O
top-level	O
directory	O
containing	O
a	O
power	O
of	O
two	O
number	O
of	O
leaf	O
arrays	O
.	O
</s>
<s>
This	O
structure	O
superficially	O
resembles	O
a	O
hash	B-Algorithm
table	I-Algorithm
with	O
array-based	O
collision	O
chains	O
,	O
which	O
is	O
the	O
basis	O
for	O
the	O
name	O
hashed	B-Data_Structure
array	I-Data_Structure
tree	I-Data_Structure
.	O
</s>
<s>
A	O
full	O
hashed	B-Data_Structure
array	I-Data_Structure
tree	I-Data_Structure
can	O
hold	O
m2	O
elements	O
,	O
where	O
m	O
is	O
the	O
size	O
of	O
the	O
top-level	O
directory	O
.	O
</s>
<s>
The	O
use	O
of	O
powers	O
of	O
two	O
enables	O
faster	O
physical	O
addressing	O
through	O
bit	O
operations	O
instead	O
of	O
arithmetic	O
operations	O
of	O
quotient	O
and	O
remainder	O
and	O
ensures	O
the	O
O(1 )	O
amortized	O
performance	O
of	O
append	O
operation	O
in	O
the	O
presence	O
of	O
occasional	O
global	O
array	B-Data_Structure
copy	O
while	O
expanding	O
.	O
</s>
<s>
In	O
a	O
usual	O
dynamic	B-Data_Structure
array	I-Data_Structure
geometric	O
expansion	O
scheme	O
,	O
the	O
array	B-Data_Structure
is	O
reallocated	O
as	O
a	O
whole	O
sequential	O
chunk	O
of	O
memory	O
with	O
the	O
new	O
size	O
a	O
double	O
of	O
its	O
current	O
size	O
(	O
and	O
the	O
whole	O
data	O
is	O
then	O
moved	O
to	O
the	O
new	O
location	O
)	O
.	O
</s>
<s>
This	O
ensures	O
O(1 )	O
amortized	O
operations	O
at	O
a	O
cost	O
of	O
O(n )	O
wasted	O
space	O
,	O
as	O
the	O
enlarged	O
array	B-Data_Structure
is	O
filled	O
to	O
the	O
half	O
of	O
its	O
new	O
capacity	O
.	O
</s>
<s>
When	O
a	O
hashed	B-Data_Structure
array	I-Data_Structure
tree	I-Data_Structure
is	O
full	O
,	O
its	O
directory	O
and	O
leaves	O
must	O
be	O
restructured	O
to	O
twice	O
their	O
prior	O
size	O
to	O
accommodate	O
additional	O
append	O
operations	O
.	O
</s>
<s>
Only	O
one	O
new	O
leaf	O
is	O
then	O
allocated	O
and	O
added	O
into	O
the	O
top	O
array	B-Data_Structure
which	O
thus	O
becomes	O
filled	O
only	O
to	O
a	O
quarter	O
of	O
its	O
new	O
capacity	O
.	O
</s>
<s>
There	O
are	O
multiple	O
alternatives	O
for	O
reducing	O
size	O
:	O
when	O
a	O
hashed	B-Data_Structure
array	I-Data_Structure
tree	I-Data_Structure
is	O
one	O
eighth	O
full	O
,	O
it	O
can	O
be	O
restructured	O
to	O
a	O
smaller	O
,	O
half-full	O
hashed	B-Data_Structure
array	I-Data_Structure
tree	I-Data_Structure
;	O
another	O
option	O
is	O
only	O
freeing	O
unused	O
leaf	O
arrays	O
,	O
without	O
resizing	O
the	O
leaves	O
.	O
</s>
<s>
Further	O
optimizations	O
include	O
adding	O
new	O
leaves	O
without	O
resizing	O
while	O
growing	O
the	O
directory	O
array	B-Data_Structure
as	O
needed	O
,	O
possibly	O
through	O
geometric	O
expansion	O
.	O
</s>
<s>
presented	O
a	O
dynamic	B-Data_Structure
array	I-Data_Structure
algorithm	O
with	O
a	O
similar	O
space	O
wastage	O
profile	O
to	O
hashed	B-Data_Structure
array	I-Data_Structure
trees	I-Data_Structure
.	O
</s>
<s>
Brodnik	O
's	O
implementation	O
retains	O
previously	O
allocated	O
leaf	O
arrays	O
,	O
with	O
a	O
more	O
complicated	O
address	O
calculation	O
function	O
as	O
compared	O
to	O
hashed	B-Data_Structure
array	I-Data_Structure
trees	I-Data_Structure
.	O
</s>
