The tree data structure mimics mother nature's tree. It is generally non-linear but is not inter-connected (is not a network).
Key Concepts:
- The most important concept is node
- There is one root node (or starting node or top node)
- Each node has zero or more child nodes (think of the pointers to those nodes as branches)
- Many trees have a defined number of children (binary = 2, ternary = 3, ...)
- Child nodes may be null
- Nodes hold data (e.g., customers, employees, etc) -- for simplicity we are showing integer data (e.g., 50, 20, 10, ...) in the diagram