Question: Ruta has generated a random 21-node full binary tree, in which each node is labeled with a consonant in the English alphabet (Y is considered
Ruta has generated a random 21-node full binary tree, in which each node is labeled with a consonant in the English alphabet (Y is considered a consonant for this tree). Unfortunately, the only record that Ruta wrote down for this tree were the following traversals of the nodes:
Inorder: PTRGCSYWKVLJQZBFMNDXH
Postorder: PRCGYSKWTLQJBMFDNZHXV
Given the two traversal orders above, list the nodes in Ruta's tree according to a Preorder traversal.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
