Computer Science, asked by naughtyyogi5472, 1 year ago

A binary tree t has n leaf nodes. The number of nodes of degree 2 in t is

Answers

Answered by anupama777vidya
0

Answer:

here is your answer ↙️↙️☺️☺️✌️✌️

In a "m-ary" tree. the number of total nodes are given by

N=mi+1

Where i: Number of internal nodes

Also, in a tree, N=I+L where L=number of leaf nodes

Here m=2

So, 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.

Hope this helps you mate ☺️☺️⭐⭐✌️✌️✅✅✅

Similar questions