Stacks
It is easy to evaluate such expressions using a stack
If you see an operand, push it on the stack
If you see an operator,
pop the required number of operands,
perform the operation
Push the result on the stack
Previous slide
Next slide
Back to first slide
View graphic version