1.

What will be the height of a balanced full binary tree with 8 leaves?(a) 8(b) 5(c) 6(d) 4My question comes from Binary Trees topic in division Binary Trees of Data Structures & Algorithms II had been asked this question during an online exam.

Answer»

The CORRECT choice is (d) 4

Easiest explanation - A balanced FULL binary tree with l LEAVES has height h, where h = log2l + 1.

So, the height of a balanced full binary tree with 8 leaves =log28 + 1 = 3 + 1 = 4.



Discussion

No Comment Found

Related InterviewSolutions