The depth of a complete binary tree is given by

Options
- Dn = n log2n
- Dn = n log2n+1
- Dn = log2n
- Dn = log2n+1


CORRECT ANSWER : Dn = log2n+1

Discussion Board
Data structure

The depth of a complete binary tree?

Amar kumar 10-14-2017 04:40 AM

Data Structure - Depth of Complete Binary Tree

The depth of complete binary tree of n nodes will be Dn=log 2 (n+1). Here Dn is the height or depth of the tree and n is the number of nodes. A complete binary tree is a binary tree where all the levels have maximum number of nodes except possibly the last level. There is a difference between complete binary tree and full binary tree. A binary tree is called as full binary in which every node other than the leaves has two children. It is also called as 2-tree.

Prajakta Pandit 02-1-2017 11:10 PM

Write your comments

 
   
 
 

Enter the code shown above:
 
(Note: If you cannot read the numbers in the above image, reload the page to generate a new one.)


Advertisement