What will be the height of a balanced full binary tree with 8 leaves?

Thành Đạt

New member
What will be the height of a balanced full binary tree with 8 leaves?
A. 8
B. 5
C. 6
D. 4
 
Answer: d
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.
 

Tìm kiếm

Back
Top