Consider the following expression tree. Root * has left child + and right…
NVS Computer Science / IT Teacher Recruitment · 2022 · PGT Computer Science · 15 Dec 2022 · Shift 2 · Computer Science or Information Technology
Consider the following expression tree. Root * has left child + and right child g; + has left child * and right child f; the lower * has children d and e. Preorder and post-order traversal of the tree will result into ________ and __________ expressions, respectively.
- A.
d * e + f * g, d e * f + g *
- B.
* + * d e f g, d e * f + g *
- C.
* + * d e f g, d * e + f * g
- D.
* + * d e f g, d e f g * + *
Attempted by 10 students.
Sign up free to check your answer
Sign up freeLoading lesson…