What does the 'height' of a tree represent?
2024
What does the 'height' of a tree represent?
Answer: B. Number of edges in the longest path from the root to a leaf — The height of a tree is the number of edges in the longest path from the root to a leaf.
- 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 508 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.
Loading lesson…