Computer Science, asked by sabarigirisan1947, 4 months ago

A binary tree generates the sequence ABCDEFG for an inorder traversal and the sequence ACBGFED for a postorder traversal. What are the total
number of nodes in the left subtree of this binary tree?

Answers

Answered by ananya06739
0

spelling errors and I could not understand the question

Answered by dreamrob
0

The total number of nodes in the left subtree of this binary tree are 3.

  • So, this is in order, this is post order, as we all know. The route was mentioned in the very last note. As a result, we'll begin with a deep the path.
  • Now we can evaluate the order in which C D is located. So everything to D's left will be in the left sub tree, and everything to D's right will be in the right subtree. So we'll go on to E.
  • If we look over here, it says, "Well, we already have the right here," which indicates all of E's rights will be in the right subtree. So F and G will be in the correct subtree, and we'll start with F. We would also have G if this was inverted as G N. F. Then F appeared in the left subtree and said, "It's F." As a result, F informs us that G must be in the correct subtree, and we'll have F.
  • Then there's F, and then there's G. Finally, we have G. As a result, G All of this is located in the appropriate subtree. Now we'll look at the subtree on the left. B informs us first. After D, B is the following step. And, yes, A, B, and C were all present.
  • A total of 123 are available. As a result, the binary tree's left subtree has three notes in total.

#SPJ2

Similar questions