Data Structures and Algorithms
with Object-Oriented Design Patterns in JavaOne of the most useful characteristics of a postfix expression is that the value of such an expression can be computed easily with the aid of a stack of values. The components of a postfix expression are processed from left to right as follows:
illustrates the use of a stack
to evaluate the RPN expression given in Equation
.

Figure: Evaluating the RPN expression in Equation
using a stack.
Copyright © 1998 by Bruno R. Preiss, P.Eng. All rights reserved.