When a tree given in the diagram is traversed inorder, the order would be

2025

When a tree given in the diagram is traversed inorder, the order would be

image.png

  1. A.

    a, b, d, h, e, i, j, c, f, g, k

  2. B.

    h, d, i, j, e, b, f, k, g, c, a

  3. C.

    )h, d, b, i, e, j, a, f, c, g, k

  4. D.

    h, d, b, i, e, j, a, f, c, k, g

Attempted by 338 students.

Show answer & explanation

Correct answer: D

Inorder traversal follows the pattern: Left Subtree -> Root -> Right Subtree.

1. Start at root 'a'. Traverse left subtree rooted at 'b':

- Go left to 'd', then left to leaf 'h'. Visit **h**.

- Visit root 'd'.

- Visit root 'b'.

- Go right to 'e'. Visit left child 'i'. Visit **i**.

- Visit root 'e'.

- Go right to 'j'. Visit **j**.

2. Visit root 'a'.

3. Traverse right subtree rooted at 'c':

- Go left to leaf 'f'. Visit **f**.

- Visit root 'c'.

- Go right to 'g'. Visit left child 'k'. Visit **k**.

- Visit root 'g'.

Final Order: h, d, b, i, e, j, a, f, c, k, g.

Explore the full course: Isro