Considering the height of a binary tree as the number of edges between the…

2018

Considering the height of a binary tree as the number of edges between the tree's root and its furthest leaf, what is the height of the binary search tree created using the following key values (in order)?
19, 14, 18, 15, 16, 13, 12

  1. A.

    3

  2. B.

    4

  3. C.

    5

  4. D.

    6

Attempted by 197 students.

Show answer & explanation

Correct answer: B

First, insert the keys sequentially into a binary search tree starting with 19 as the root. Following standard BST rules, 14 becomes the left child of 19, and 18 becomes the right child of 14.

The longest path from root to leaf is 19-14-18-15-16. Counting the edges between these nodes gives a total of four edges. Therefore, the height of this binary search tree is 4.

Explore the full course: Up Lt Grade Assistant Teacher 2025