The listing of nodes after applying the preorder traversal over the following…

2017

The listing of nodes after applying the preorder traversal over the following binary tree is:

image.png

  1. A.

    A, B, D, H, I, E, J, K, C, F, G, L

  2. B.

    H, D, I, B, J, E, K, A, L, F, C, G

  3. C.

    H, I, D, J, K, E, B, L, F, G, C, A

  4. D.

    A, B, D, H, I, E, J, K, C, F, L, G

Attempted by 283 students.

Show answer & explanation

Correct answer: D

The correct option is D. Preorder traversal follows the Root Left Right strategy. Starting from root A, we visit the left subtree deeply before moving right. The step-by-step visit order yields: A, B, D, H, I, E, J, K, C, F, L, G.

Explore the full course: Niacl Ao It Specialist