Skip to content
← Back to glossary

木構造Tree structure

Learn in the textbookFundamentals of Data Structures

DefinitionA tree structure (木構造) is a data structure in which nodes (節) holding data branch out through parent-child links and connect in levels.

ExplanationThe top node with no parent is called the root, the end nodes with no children are called leaves, and every node other than the root has exactly one parent. The structure suits anything with a chain of command or containment, such as an organization chart or a folder hierarchy.

AnalogyThink of the folders on a computer. One folder can hold several folders, and each of those can hold more folders or files.

Memory hookIt is drawn as an upside-down tree, so the root sits at the top and the leaves at the bottom.

Related past-exam questions(1 question)