What does the 'height' of a tree represent?

2024

What does the 'height' of a tree represent?

  1. A.

    Number of nodes in the longest path from the root to a leaf

  2. B.

    Number of edges in the longest path from the root to a leaf

  3. C.

    Total number of nodes in the tree

  4. 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.

Explore the full course: Cocubes Preparation