Questions & Answers of Stacks

Question No. 146

Consider the following New-order strategy for traversing a binary tree:
 $\bullet$Visit the root;
 $\bullet$Visit the right subtree using New-order;
 $\bullet$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:

Question No. 228

The result evaluating the postfix expression 10 5 + 60 6 / * 8 – is

Question No. 38

The following postfix expression with single digit operands is evaluated using a stack:

8 2 3 ^ / 2 3 * + 5 1 * -

Note that ^ is the exponentiation operator. The top two elements of the stack after the first * is evaluated are: