Multiple choice

What will be the pre-order traversal of the given in-order traversal of tree SQTPURV?

  1. PQSTRUV

  2. PQSTRVU

  3. TQSPRUV

  4. TSQPRUV

  5. None of the above

Reveal answer Fill a bubble to check yourself
A Correct answer
Explanation

The given in-order traversal of tree SQTPURV has root node P (the middle element of tree) and left of P is left subtree and right of P is right subtree, so in pre-order traversal, the root node comes first followed by left and right subtree like PQSTRUV.