Multiple choice

Which data structures are used to evaluate a postfix expression?

  1. Stacks

  2. Queues

  3. Dequeues

  4. None of these

Reveal answer Fill a bubble to check yourself
A Correct answer
Explanation

Stacks are used for postfix expression evaluation because operators are applied to the most recent operands, matching the LIFO (Last In First Out) principle. When encountering an operator, pop required operands from the stack, apply the operation, and push the result back.