AI engineering glossary · Data structures algorithms
What is tree?
Tree: A hierarchical structure of nodes connected by edges, with one root at the top, where each other node has exactly one parent and zero or more children. It naturally represents nested data and enables fast searching when kept ordered.
Tree: an example
A folder structure on a laptop is a tree: the root drive contains folders, which contain files and further folders.
Related terms
More Data structures algorithms terms
- Tree traversal
- Trie
- Two pointers
- Union-find
- Weighted graph
- Worst-case analysis
- A* search
- Abstract data type
Where you learn it
Tree is part of the AI Engineering Program, which teaches it with notes, a hands-on lab and an exam. The first lesson is free.