-
Consider the following New-order strategy for traversing a binary tree :
• Visit the root;
• Visit the right subtree using New-order;
• Visit the left subtree using New-order;
The New-order traversal of the expression tree corresponding to the reverse polish expression 3 4 * 5 – 2 ^ 6 7 * 1 + – is given by :
-
- + – 1 6 7 * 2 ^ 5 – 3 4 *
- – + 1 * 6 7 ^ 2 – 5 * 3 4
- – + 1 * 7 6 ^ 2 – 5 * 4 3
- 1 7 6 * + 2 5 4 3 * – ^ –
- + – 1 6 7 * 2 ^ 5 – 3 4 *
Correct Option: C
The expression tree for the given post-fix expression is as follows :
New-order of shown expression tree is – + 1 * 7 6 ^ 2 – 5 * 4 3