GATE 2017 [Set-1]
October 12, 2023UGC NET CS 2014 Dec-Paper-2
October 12, 2023UGC NET CS 2014 Dec-Paper-2
Question 25
|
A full binary tree with n leaves contains
n nodes
|
|
log 2 n nodes
|
|
2n –1 nodes
|
|
2 n nodes
|
Question 25 Explanation:
A Binary Tree is full if every node has 0 or 2 children. So, in such case, the binary tree with n leaves contains a total of 2*n-1 nodes.
![](https://solutionsadda.in/wp-content/uploads/2019/04/Screenshot-from-2019-04-16-18-26-53.png)
There are 4 leaf nodes in the above tree.
So, total number of nodes are 2*4-1
=8-1
=7
![](https://solutionsadda.in/wp-content/uploads/2019/04/Screenshot-from-2019-04-16-18-26-53.png)
There are 4 leaf nodes in the above tree.
So, total number of nodes are 2*4-1
=8-1
=7
Correct Answer: C
Question 25 Explanation:
A Binary Tree is full if every node has 0 or 2 children. So, in such case, the binary tree with n leaves contains a total of 2*n-1 nodes.
![](https://solutionsadda.in/wp-content/uploads/2019/04/Screenshot-from-2019-04-16-18-26-53.png)
There are 4 leaf nodes in the above tree.
So, total number of nodes are 2*4-1
=8-1
=7
![](https://solutionsadda.in/wp-content/uploads/2019/04/Screenshot-from-2019-04-16-18-26-53.png)
There are 4 leaf nodes in the above tree.
So, total number of nodes are 2*4-1
=8-1
=7
Subscribe
Login
0 Comments