What does the 'height' of a tree represent?
2024
What does the 'height' of a tree represent?
- A.
Number of nodes in the longest path from the root to a leaf
- B.
Number of edges in the longest path from the root to a leaf
- C.
Total number of nodes in the tree
- D.
Total number of edges in the tree
Attempted by 280 students.
Show answer & explanation
Correct answer: B
The height of a tree is the number of edges in the longest path from the root to a leaf.