in DS recategorized by
795 views
2 votes
2 votes

A full binary tree with $n$ non-leaf nodes contains

  1. $\log_ 2 n$ nodes
  2. $n+1$ nodes
  3. $2n$ nodes
  4. $2n+1$ nodes
in DS recategorized by
by
795 views

1 comment

Full binary tree is a tree in which every node is having either 0 or 2 children.

In case of full binary tree if n non-leaf nodes are there, then there must be 2n+1 nodes.
0
0

2 Answers

1 vote
1 vote

In full tree , the node will either have 2 or no children. 

Thus 1 node has 2 children

2 node has 4 children

3 nodes have 6 children

hence “n” internal nodes have 2n+1 children (1 for including the root)

1 vote
1 vote
The relationship between external(leaf) nodes and internal nodes for binary tree is: $$L = i +1$$

According to ques, $i = n$ so using formula,

$$L = n+1$$

Since tree is made up of internal and leaf nodes

Therefore, Total no. of nodes(N) = $L +i$

So , $$N = n+1+n$$

$$Ans:N = 2n+1$$
Answer:

Related questions