A binary tree is a tree data structure where each node has a left and a right child.
A binary tree can be represented using an array data structure. In case the tree is complete then this method does not waste any space.
The index of the left-node is given by:
The index of the right-node is given by:
The index of the parent of a node is given by:
where: