Written by the Fiveable Content Team โข Last updated September 2025
Verified for the 2026 exam
Verified for the 2026 examโขWritten by the Fiveable Content Team โข Last updated September 2025
Definition
Trees are hierarchical data structures consisting of nodes connected by edges. Each node has zero or more child nodes, except for the root node which has no parent. Trees are commonly used for organizing data in a hierarchical manner.
Related terms
Binary trees: Trees where each node has at most two child nodes.
Depth-first search: A traversal algorithm that explores as far as possible along each branch before backtracking.
AVL trees: Balanced binary search trees that maintain a balanced height to ensure efficient operations.