Question 53

Which of the following data structures is most suitable for evaluating postfix expressions?

  1. ATree
  2. BStack
  3. CLinked list
  4. DQueue
Show answerHide answer

Correct answer: (B) Stack

Explanation

Operands are pushed onto a stack. When an operator is read, the top two operands are popped, the operator is applied and the result is pushed back, so a stack is the natural structure for postfix evaluation.

From DSSSB TGT Computer Science Practice Set 1

This is question 53 of DSSSB TGT Computer Science Practice Set 1. See all questions of this paper with answers, or attempt the paper as a timed online test to get your score and all-India rank.