Question 1872 – Binary-Trees
April 23, 2024Question 8591 – Binary-Trees
April 23, 2024Question 243 – Binary-Trees
Consider the following tree
If the post order traversal gives ab-cd*+ then the label of the nodes 1,2,3,… will be
Correct Answer: A
Question 86 Explanation:
Step-1: Post order traversals yields from left,right and root.
Step-2: The post order sequence is 4526731. The same we have to take it for above constraint.
Step-3: Then the sequence will be ab–cd*+ because 1= +, 2= -, 3= *, 4= a, 5=b, 6=c and 7=d.
Step-2: The post order sequence is 4526731. The same we have to take it for above constraint.
Step-3: Then the sequence will be ab–cd*+ because 1= +, 2= -, 3= *, 4= a, 5=b, 6=c and 7=d.
+,-,*,a,b,c,d
a,-,b,+,c,*,d
a,b,c,d,-,*,+
-,a,b,+,*,c,d
Subscribe
Login
0 Comments