Subtree (source code)

= Subtree

For a <vertex> $u$ in a <rooted tree>, its <subtree> contains $u$ and every <vertex> reachable by repeatedly following <children in a rooted tree>, together with the connecting <edges>; its <root of a tree> is $u$. In a <binary tree>, the left <subtree> is rooted at the left child, and is empty when that child is absent; the right <subtree> is defined similarly. A <binary search tree> constrains every key in these <subtrees>.