PRASHNIKAप्रश्निका
‹ Back to the paper

Answer the following questions from the binary tree.

State the height of the tree, if the root is at level 0 (zero).

Computer Science20181 markShort answer
Figure for this question

Answer

Answer

Checked answer.
A is at level 0; E and B at level 1; G, C and D at level 2; H and F at level 3. The deepest nodes are at level 3, so the height of the tree is 3.
Data structures

From ISC 2018 Computer Science Paper 1, question 12(b)(ii).