previous
|
index
|
next
An Array Implementation of Binary Heaps
For each node
a
in
A
, if
a
is located at index
i
, then:
a
's left child (if any) is stored in
A[2i]
, and
a
's right child (if any) is stored in
A[2i+1]
For the children of the root
1
:
previous
|
index
|
next