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

2017

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

  1. A.

    Tree

  2. B.

    Stack

  3. C.

    Linked list

  4. D.

    Queue

Attempted by 1590 students.

Show answer & explanation

Correct answer: B

Postfix expression evaluation uses a stack because operands are pushed onto the stack, and when an operator is encountered, operands are popped, evaluated, and the result is pushed back onto the stack.

Explore the full course: Up Lt Grade Assistant Teacher 2025