Computer Science, asked by akkisisterd, 10 months ago

If a binary tree has 6 leaf nodes. Then number of nodes with degree 2 in this tree
is?​

Answers

Answered by ıtʑFᴇᴇʟɓᴇãᴛ
13

N=2i+1.

2i+1=i+l

L=I+1 The number of leaves are 1 plus the number of internal nodes in binary tree.

Here, given L=n, subsitute above and we will get I=n-1.

Answered by ansiyamundol2
0

Answer:

Number of nodes with degree 2 is 5.

Explanation:

Binary tree : A data structure in which a record is linked to two successor records, the left branch when the previous record is greater and the right branch when the previous record is less.

We know that if a binary tree consists of n leaf nodes, then the number of nodes with degree 2 in it will be n-1.

By taking the values given in the question :

n=6\\n-1=5

Hence we can say that there are 5 nodes with degree 2 in this tree.

Similar questions