Which of the following is the Postorder traversal of the binary tree whose…

2017

Which of the following is the Postorder traversal of the binary tree whose Inorder and Preorder traversals are as follows?

In-order : OLCHJBEKNGMADFI
Preorder : KHLOCBJEAGNMFDI

  1. A.

    ADFLIBNCJEMGHOK

  2. B.

    OCLJEBGDIAFNMHK

  3. C.

    ADFLIBNMGJCEHOK

  4. D.

    OCLJEBHNMGDIFAK

Attempted by 185 students.

Show answer & explanation

Correct answer: D

The first element in Preorder (K) is the root. Finding K in Inorder splits the tree into a Left Subtree (OLCHJBE) and a Right Subtree (NGMADFI). Recursively reconstructing the tree structures yields the final Postorder sequence (Left Right Root), which must end with the root node K.

Explore the full course: Niacl Ao It Specialist