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. 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:

  2. The inorder traversal of the following tree is :

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

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

  5. Binary tree with root A and nodes B to H

    Considering above binary tree, what will be the inorder traversal

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