2. Stacks can
help optimize
the solution
• Writing out each step-in
pseudocode may be helpful when
trying determine if you should use
specific conditional statements such
as if-else, for, and while loop.
4. Procedure for
Post-Fix
Notation
• The operands are pushed to the stack in the
order they appear in.
• Calculations are processed based on the
three levels of precedence for the following
binary operators.
• *Remember “Please Excuse My Dear Aunt
Sally!
• Exponentiation
• Multiplication and division
• Addition and Subtraction
5. Utilizing a
Stack for
Calculations
Pop is used for the two
higher precedence according
to the PEMDAS operation
order. Then it is executed.
After the calculations are
processed, the result will be
pushed into the stack.