GATEverse
← GATE CSE 1994

Q8

NATMarks unknown

A rooted tree with 1212 nodes has its nodes numbered 11 to 1212 in pre-order. When the tree is traversed in post-order, the nodes are visited in the order 3,5,4,2,7,8,6,10,11,12,9,13, 5, 4, 2, 7, 8, 6, 10, 11, 12, 9, 1. Reconstruct the original tree from this information, that is, find the parent of each node, and show the tree diagrammatically.

Sign in to save attempts.

Loading…