Computer Science, asked by rprathapraju, 2 months ago


Q6
Consider a binary tree, T consisting of five nodes from A to E. The level order traversel of Tis ABCDE Which of the fing modes
level 2, assuming root node to be at level O?
Ops: A. OD
B.
Ос
O E
D
None of the mentioned options​

Answers

Answered by Sonam200583
4

Answer:

48 is answer please mark me as brainlist

Answered by KailashHarjo
0

The nodes that will be on level 2, assuming root node to be at level O are D and E. Hence, option(A) and (C) is the correct answer.

  • Binary trees are trees with no more than two children for each of their elements. We typically refer to them as the left and right child since each element in a binary tree can only have two children.
  • A pointer to the tree's highest node serves as a representation of a tree. The root's value is NULL if the tree is empty.
  • Here, the given nodes are ABCDE. The root node will be A and its left child will be B and its right child will be C.
  • Now while inserting the child nodes, Level order traversal of a tree is followed, which means Before moving on to the nodes at the next depth level, it begins at the root of the tree and investigates every node there.
  • Hence. at level 1 which contains B and C, the next nodes that is D and E will be the child nodes of B. Since there are no more nodes, C will not have any child nodes.
  • Therefore, at level 2 we have two leaf nodes D and E. Hence the correct option is (A) and (C).

To learn more:

https://brainly.in/question/2293781

https://brainly.in/question/11504854

#SPJ2

Similar questions