Mental Model
A tree is like a family tree where each person is connected to parents and children. We use special names for the top person, the bottom people, and how far each person is from the top.
Analogy: Imagine a family tree: the oldest ancestor is the root, the youngest children with no kids are leaves, height is how tall the family tree is, depth is how far a person is from the oldest ancestor, and level is the generation number.
Root (A)
/ \
(B) (C)
/ \ \
(D) (E) (F)
Legend:
- Root: A
- Leaves: D, E, F
- Height: longest path from root to leaf
- Depth: distance from root to a node
- Level: depth + 1