The following sequence corresponds to the preorder traversal of a binary…
2026
The following sequence corresponds to the preorder traversal of a binary search tree 𝑇:
50, 25, 13, 40, 30, 47, 75, 60, 70, 80, 77
The position of the element 60 in the postorder traversal of 𝑇 is ______. (answer in integer) Note: The position begins with 1.
Attempted by 23 students.
Show answer & explanation
Correct answer: 7
Step 1: Reconstruct the Binary Search Tree (BST) using the given preorder traversal: 50, 25, 13, 40, 30, 47, 75, 60, 70, 80, 77.
Step 2: Identify the root (50). Left subtree contains values < 50: 25, 13, 40, 30, 47. Right subtree contains values > 50: 75, 60, 70, 80, 77.
Step 3: Recursively build subtrees. Left root is 25. Right root is 75. Continue recursively to form the full tree structure.
Step 4: Generate postorder traversal (Left, Right, Root). Sequence: 13, 30, 47, 40, 25, 70, 60, 77, 80, 75, 50.
Step 5: Locate element 60 in the sequence. It is at the 7th position.