All Exams Test series for 1 year @ ₹349 only
Question

Consider the traversal of a tree

Preorder → ABCEIFJDGHKL

Inorder → EICFJBGDKHLA

Which of the following is correct post order traversal?

The correct answer is

IEJFCGKLHDBA

The preorder root is A, with the remaining nodes in its left subtree rooted at B. B has subtrees rooted at C and D; their postorders are IEJFC and GKLHD. Visiting these subtrees before B and then A gives IEJFCGKLHDBA.

Was this answer helpful?

Important Questions from Tree Traversal - Teaching

  1. Postorder traversal of a given binary search tree T produces following sequence of keys: 3, 5, 7, 9, 4, 17, 16, 20, 18, 15, 14 Which one of the following sequences of keys can be the result of an in-order traversal of the tree T?

  2. The inorder traversal of the following tree is :

  3. Level order Traversal of a rooted Tree can be done by starting from root and performing :

  4. The inorder and preorder Traversal of binary Tree are dbeafcg and abdecfg respectively. The post-order Traversal is __________.

  5. Arrange the following steps of the Inorder Traversal of Binary Tree in the correct order.

    A. Visit the Left subtree

    B. Visit the Root node

    C. Visit the Right subtree

    D. Start traversing by visiting the nodes in rooted tree

    E. Repeat the above three steps.

    Choose the correct answer from the options given below:

Need Expert Advice?

Start Your Preparation with Prepp Mobile App

Download the app from Google Play & App Store
Download the app from Google Play & App Store
Prepp Mobile App