• Call Us : 03082533000 (WhatsApp)
  • Email Us : TestPointpk.com@gmail.com
Sticky Note
When in-order traversing a tree resulted in E A C K F H D B G; the preorder traversal would return?
  1. FAEKCDHGB
  2. FAEKCDBHG
  3. EAFKHDCBG
  4. FEAKDCHBG
Explanation

E: This is the leftmost node in the in-order sequence. It becomes the root in the preorder traversal.

A: The next node after E is its left child. So, A is the left child of E.

C: Moving further, C is the right child of A.

K: K is the right child of C.

F: F is the right child of K.

H: H is the right child of F.

D: D is the left child of F.

B: B is the left child of A.

G: Finally, G is the right child of B.

Putting it all together, we get the preorder traversal: FAEKCDHGB.

Related MCQs

  1. Mango
  2. Carrot
  3. Apple
  4. Banana
اس سوال کو وضاحت کے ساتھ پڑھیں

  1. Painting
  2. Sketch
  3. Drawing
  4. Picture
اس سوال کو وضاحت کے ساتھ پڑھیں

  1. Fruit
  2. Flower
  3. Vegetable
  4. City
اس سوال کو وضاحت کے ساتھ پڑھیں

  1. A
  2. B
  3. C
  4. Both b & c
اس سوال کو وضاحت کے ساتھ پڑھیں

  1. 7677: 77767: 77767
  2. 7677: 76767: 77677
  3. 7677: 77667: 77767
  4. 77677: 76767: 77767
اس سوال کو وضاحت کے ساتھ پڑھیں

Leave a Reply

Your email address will not be published. Required fields are marked *

1 + 2 = ?



All Rights Reserved © TestPointpk.com