juniorTrees
Junior Tree Question 9: Basic Tree Concepts
Updated Apr 28, 2026
Short answer
A tree is a non-linear data structure representing a hierarchy.
Deep explanation
Explain nodes, edges, root, leaves, and parent-child relationships. Trees are directed acyclic graphs where any two vertices are connected by exactly one path.
Real-world example
File systems on a hard drive.
Common mistakes
- Confusing trees with general graphs that allow cycles.
Follow-up questions
- What is a leaf node?
- What is the height of a tree?