ULUI CO.
10 ques
Consider a binary tree, T. The array representation of T is: A, B, C, D, E, F, G. What is the number of internal nodes present in T?
s: A.2
B. 4
C. 5
D. 3
Answers
Answered by
0
C. 5
Binary tree :
- A binary tree is a tree data structure in which each node has at most two offspring, referred to as the left child and the right child.
- Binary trees are mostly employed in computing for searching and sorting since they allow data to be stored hierarchically.
- Insertion, deletion, and traversal are some of the most frequent operations that can be performed on binary trees.
#SPJ2
Answered by
0
The number of internal nodes present in T is 3.
- In a binary tree, the branches of the tree are made up of up to two child nodes for each node.
- The left and right nodes are the common names for the two youngsters.
- Child nodes may make references to their parents, whereas parent nodes are nodes with children.
- If T has a total of N nodes, the number of internal nodes is I = (N – 1)/2
Here, N = 7.
Therefore, l = (7-1)/2 = 6/2 = 3
#SPJ3
Similar questions