Trees

A tree is a hierarchical structure of nodes connected by parent-child links, with a root node and no cycles. Nodes with no children are leaves. Trees model folders, HTML documents or decisions. A binary search tree allows fast lookups if the tree stays balanced.

Example

A file system: the root contains folders, which contain files.

Related concepts

The whole glossary