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?
Answer: B. Stack — Postfix expression evaluation uses a stack because operands are pushed onto the stack, and when an operator is encountered, operands are popped, evaluated,…
- A.
Tree
- B.
Stack
- C.
Linked list
- D.
Queue
Attempted by 2679 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: Bihar Stet Paper Ii Computer Science
Loading lesson…