What a BST reveals without its insertion order
Binary Search & Balanced Trees

Answer & solution
Official answer: A
Approach: Use the BST order invariant and test the other traversals on two possible insertion sequences.
1. Derivation. An inorder traversal of a BST with distinct keys and smaller keys to the left always visits exactly the sorted set V, regardless of insertion order. The first inserted key becomes the root, and different insertion orders can change the root, preorder, and postorder. Hence only inorder is determined in general, option A. Trivial sets can coincidentally determine more, but do not establish those claims for arbitrary V.
2. Explanation and checks. For V={1,2,3}, inserting 2,1,3 gives root 2, preorder 2,1,3 and postorder 1,3,2. Inserting 1,2,3 gives root 1, preorder 1,2,3 and postorder 3,2,1. Both have inorder 1,2,3. Recursively, inorder visits smaller values, then the node, then larger values; thus it is the sorted list for every valid shape. The examples demonstrate why knowledge of the set alone cannot recover the shape-sensitive alternatives.




