parent and child

The relationship between two directly connected tree nodes: the parent is the one nearer the root and the child the one below it.

In more detail

A binary tree node has up to two children. In an array-backed heap, the children of index i are at 2i + 1 and 2i + 2, and its parent is at (i - 1) // 2. Post-order traversal handles children before their parent.

Related terms

Taught in

References