Prepare
Practice
Interview
Aptitude
Reasoning
English
GD
Placement papers
HR
Current affairs
Engineering
MCA
MBA
Online test
Login
Complete Binary Tree depth - Data Structure
Home
>>
Category
>>
Programming Language (MCQ) questions
>>
Data Structure
Q. Which of the following is the depth of a Complete Binary Tree?
- Published on 26 Aug 15
a.
Dn = n log2n
b.
Dn = n log2n + 1
c.
Dn = log2n
d.
Dn = log2n + 1
ANSWER: Dn = log2n + 1
Related Content
Networking (
207
)
Database (
97
)
C programming (
58
)
Software Engineering (
28
)
SQL (
5
)
HTML (
74
)
Web Technologies (
11
)
Data Structure (
140
)
Operating System (
96
)
Java (
25
)
Oracle (
5
)
C++ (
50
)
Algorithms (
7
)
PL/SQL (
13
)
JavaScript (
7
)
XML (
0
)
CSS (
1
)
Discussion
Nirja Shah
-Posted on 21 Nov 15
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.
➨
Post your comment / Share knowledge
Required!
Required!
Invalid Email Id!
Required!
Enter the code shown above:
Please enter the code shown above
(Note: If you cannot read the numbers in the above image, reload the page to generate a new one.)
MCQs
English
Tutorials
Download
▲