Graph Algorithms

Answer & solution
Answer: B (no official key was published)
Start BFS from an unvisited vertex and mark everything reachable. In an undirected graph this is exactly its connected component. Repeating from remaining unvisited vertices finds every component in O(V+E), disproving B. DFS works similarly. Optimal BST construction has a dynamic-programming formulation. Preorder and postorder alone do not generally distinguish a node’s sole left child from its sole right child, so nonuniqueness is possible. That last statement is a general insufficiency, not a claim that every traversal pair is ambiguous.