Академический Документы
Профессиональный Документы
Культура Документы
Recall that in a binary tree each node can have a left child node and/or a right child node. A leaf is a
node with no children.
An almost complete binary tree is a binary tree in which the following 3 conditions hold: all the leaves
are at the bottom level or the bottom 2 levels, all the leaves are in the leftmost possible positions, and
(except possibly for the bottom level) all levels are completely filled with nodes.
Here are some examples of almost complete binary trees. Note that there is no particular ordering of
the letters.
/ \
G A
/ \ /
T W G