1.

Which of the following is valid reverse polish expression?(a) a op b(b) op a b(c) a b op(d) both op a b and a b opThis interesting question is from Application of Stacks topic in chapter Application of Stacks of Data Structures & Algorithms IThis question was posed to me during a job interview.

Answer»

The correct CHOICE is (c) a b op

The best EXPLANATION: The postfix expression is also known as the REVERSE polish expression. In postfix expressions, the operators come after the operands. So, the correct expression is a b op and hence a b op is correct.



Discussion

No Comment Found

Related InterviewSolutions