162k views
1 vote
Determine the order in which an inorder traversal visits the vertices of the given ordered rooted tree.

1 Answer

1 vote
I think you forgot to include the diagram, the answer is d,b,f,e,g,a,c.

Explanation:

The left subtree of the root approaches first which is namely the tree rooted at b. There again the left subtree approaches first so the list begins with d. Afterwards that approaches b the root of this subtree and then the right subtree of b specifically in order f, e and g. At that point approaches the root of the whole tree and finally its right child. Thus the answer is d,b,f,e,g,a,c.
User Ovunccetin
by
8.0k points